git clone git@github.com:yosriady/serverless-crud-go-tf.git
cd serverless-crud-go-tf
dep ensure
- The Lambda functions lives in
handlers/
. main.tf
is a Terraform configuration for deploying the Lambdas.
./build.sh
This step will compile and compress handlers/*.go
into build/*.zip
files to be deployed to AWS Lambda.
-
Run
terraform init
to initialize the terraform repository. -
Then run
terraform plan
to create the execution plan. -
Finally,
terraform apply
to apply the changes (run the execution plan).
aws lambda invoke \
--invocation-type RequestResponse \
--function-name hello \
--region ap-southeast-1 \
--log-type Tail \
--payload '"test"' \
outputfile.txt