Demo Application for AWS API Gateway using Golang and Terraform
- Golang 1.20
- Terraform 1.x
- AWS SAM (for local invocation and debugging only)
- Docker
Follow the official documentation to install Go on your machine.
If you are using Linux you should use your package manager.
Example Fedora:
sudo dnf install golang
If you want to use a debugger during development then install following the official documentation.
Then create a run configuration in Goland: Edit configurations -> + -> Go Remote -> Port: 5858
Installation example for Linux:
go install github.com/go-delve/delve/cmd/dlv@master
then add to .bashrc:
export PATH="$HOME/go/bin:$PATH"
Everything you need to invoke a function with an active debugger can be found in the makefile. Look for targets starting with debug-.
Example:
make debug-AddItemFunction
This will start the function and wait until a debugger is connected.
AWS SAM is needed for local invocation in order to debug each Lambda function
todo