User Story
As a developer, I want Lambda functions to be automatically deployed when code is merged to main so that the backend is always up to date without manual intervention.
Description
We have no CD pipeline for our Lambdas. After a PR merges to main, deploying updated Lambda code is a manual process. Create a GitHub Actions workflow that automatically builds, packages, and deploys only the changed Lambda functions to AWS on merge to main.
Can coordinate with Rayna on her module if relevant (#159).
Acceptance Criteria
- Create a new workflow at
.github/workflows/lambda-deploy.yml triggered on push to main
- Detect which lambdas under
apps/backend/lambdas/ changed
- For each changed lambda, run
npm ci and npm run package to produce lambda.zip
- Deploy each changed lambda using the AWS CLI (
aws lambda update-function-code) with a consistent naming convention
- Use a matrix strategy so changed lambdas build and deploy in parallel with
fail-fast: false
- Add a summary job that reports overall success/failure
- Use existing AWS credentials from repo secrets
- Add this workflow as a required check in the GitHub Terraform module's branch protection if appropriate
User Story
As a developer, I want Lambda functions to be automatically deployed when code is merged to
mainso that the backend is always up to date without manual intervention.Description
We have no CD pipeline for our Lambdas. After a PR merges to
main, deploying updated Lambda code is a manual process. Create a GitHub Actions workflow that automatically builds, packages, and deploys only the changed Lambda functions to AWS on merge tomain.Can coordinate with Rayna on her module if relevant (#159).
Acceptance Criteria
.github/workflows/lambda-deploy.ymltriggered on push tomainapps/backend/lambdas/changednpm ciandnpm run packageto producelambda.zipaws lambda update-function-code) with a consistent naming conventionfail-fast: false