Skip to content

Demo Application for AWS API Gateway using Golang and Terraform

License

Notifications You must be signed in to change notification settings

phroust/golang-api-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS API Demo using Golang and Terraform

Demo Application for AWS API Gateway using Golang and Terraform

Requirements

Environment

  • Golang 1.20
  • Terraform 1.x
  • AWS SAM (for local invocation and debugging only)
  • Docker

Local Setup

Golang Setup

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

Install Debugger

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"

Debug Application

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.

Resources

Q & A

Why AWS SAM?

AWS SAM is needed for local invocation in order to debug each Lambda function

Why not use Terraform Workspaces?

todo

About

Demo Application for AWS API Gateway using Golang and Terraform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published