Model/infrastructure/terraform/lambda/_template
2026-04-07 09:51:26 +00:00
..
main.tf move lambda_with_sqs to terraform/modules 2026-03-09 13:39:09 +00:00
provider.tf upgrade terraform AWS provider 2026-03-11 15:38:16 +00:00
README.md update readme 2026-02-16 16:12:36 +00:00
variables.tf maximum concurrent 2026-04-07 09:51:26 +00:00

Checklist for adding a new Lambda

1. Create the Lambda scaffold

  • Copy the template:

    cp -r lambda/_template lambda/<lambda_name>


2. Add infrastructure prerequisites (shared stack)

  • Add a new ECR repository in:

    infrastructure/terraform/shared/main.tf

  • Create a PR to deploy this to main then dev in order to deploy the shared stack

  • Verify the ECR repository exists in AWS


3. Add Docker build configuration

  • Create a Dockerfile for the Lambda
  • Verify the Dockerfile path and build context
  • Add a new image build job in deploy_terraform.yml using _build_image.yml

4. Wire the Lambda deploy job (CI)

  • Add a deploy job using _deploy_lambda.yml
  • Ensure the deploy job depends on the image build job

5. Deploy

  • Push changes to GitHub
  • CI will:
    1. Build and push the Docker image
    2. Deploy the Lambda
    3. Verify everything deployed. Good things to check:
    • ECR with image
    • SQS
    • Trigger SQS
      • Cloud watch logs

5. Delete

  1. Delete README if you used cp -r

Please feel free to update this document to make it easier for the next person