avoidik / sample_lambda

Sample AWS Lambda function written in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Sample AWS Lambda function written in Go


Languages

Language:HCL 49.1%Language:Go 34.7%Language:Shell 16.2%