AWS Lambda functions and API gateway are often used to create serverless applications.
This repo is a companion repo to the AWS Lambda functions and API gateway tutorial.
-
Init the hello-world project.
cd hello-world npm install
-
Compile the typescript code to javascript.
npm run build
-
Init terraform.
cd .. terraform init
-
Create all the infrastructure.
terrform apply
-
Then we call the api.
curl "$(terraform output -raw base_url)/hello?Name=Terraform"
-
Create an item in Music table
"Artist","SongTitle","AlbumTitle","Awards" "Acme Band","Happy Day","Album Title","10" curl "$(terraform output -raw base_url)/hello?Name=Acme+Band&SongTitle=Happy+Day"
-
Don't forget to destroy everything when you finished testing.
terrform destroy