This repo is an example repo for deploying a golambda to AWS using AWS CDK.
Steps:
- install the packages
xc getor
go get ./...- configure aws
aws configureor set the following environment variables in your command line.
export AWS_ACCESS_KEY_ID="..."
export AWS_SECRET_ACCESS_KEY="..."
export AWS_SESSION_TOKEN="..."You will need an IAM user to access these. After logging in, click a user, Then click Command line or programmatic access. Copy your environment variables.
- run bootstrap
cdk bootstrap- deploy
cdk deployThese tasks follow eXeCute syntax, therefore can be ran with xc [taskname].
Install the Go dependencies for the project.
go get ./...Builds the api/.
go build ./...Runs the api locally.
Requires: build-api
go run api/main.go