Skip to content

avoidik/sample_lambda

Repository files navigation

AWS Lambda in Go

What's inside

  • Sample AWS Lambda function written in Golang with DynamoDB as a storage backend
  • AWS API Gateway bridge to AWS Lambda function
  • Dependencies management with Glide
  • Terraform for infrastructure deployment

Windows dependency

go.exe get -u github.com/aws/aws-lambda-go/cmd/build-lambda-zip

Workflow

  1. aws --profile personal configure - configure AWS profile
  2. deps.sh - download dependencies
  3. build.sh - build Lambda source code
  4. infra.sh - create infrastructure with Terraform
  5. invoke.sh - invoke Lambda function
  6. get.sh 1 - invoke API Gateway (GET)
  7. post.sh - invoke API Gateway (POST)
  8. get.sh 3 - invoke API Gateway (GET)
  9. cleanup.sh - destroy infrastructure with Terraform

Reference

https://www.alexedwards.net/blog/serverless-api-with-go-and-aws-lambda

Releases

No releases published

Packages

No packages published