We would like you to deploy a simple "hello world" http app in AWS, using Api Gateway and Lambda.
Now it is up to you to write the code!
For the infrastructure code, use terraform.
For the application code, you can use choose which language to use.
The challenge is to write the code.
If you have an AWS account you can also deploy it, but this is not required!
Extra points: Add CI/CD to your deployment.
This solution implements a simple HTTP API in API Gateway and a zip code deployed Lambda. We use GitHub actions for CI/CD.
After deploying the terraform code:
$ curl -X POST <invoke_url>
{"message": "hello world"}
$ curl -X POST <invoke_url> -H 'content-type: application/json' -d '{ "greeter": "Stefan" }'
{"message": "hello Stefan"}- For CI/CD integration to work you need to setup OIDC integration and create a role called
github-actionwith theTrust relationshipdescribed in the link and enough permissions policies to deploy lambdas, API Gateways and CloudWatch log groups - Create a
AWS_ACCOUNT_IDvariable in your workspace with your AWS Account ID
- Terraform is used for initial code deployment but it's NOT used for code management. For subsequent Terraform runs changes to code are ignored.
- A GitHub actions workflow is triggered every time there's a commit to
mainwith changes to./srcdirectory