This is from the repo of Serverless examples, specifically the GO with DyanmoDB https://github.com/serverless/examples/tree/master/aws-golang-rest-api-with-dynamodb
I changed it to make seperate main.go files for each function, and to make it work with serverless-offline and DynamoDB-local in a Docker container
-
You use Node 14.15.5 to install Serverless and all plugins dherault/serverless-offline#1151
- If you don't everything except GET calls will NOT work. They will not even get to the Lambda or the logs, it will simply hang
-
Remove CGO from build params serverless/serverless#8539 (comment)
-
GO only works with serverless-offline when using Docker ( --useDocker) dherault/serverless-offline#381 (comment)
-
DynamoDB local in a container with admin GUI https://github.com/instructure/dynamo-local-admin-docker
-
Remember to add --dockerNetwork to hit the DynamoDB container