Overview
Production Go Lambdas underapps/*-lambda ship through the Lambda Deploy workflow on every push to prod and through workflow_dispatch (manual Lambda Deploy run).
Each deploy job builds a Linux bootstrap binary, uploads a versioned artifact to S3, and updates the function code via SSM parameters and shared actions under .github/actions/.
Current workers:
Concurrency groups append
${{ github.ref }} (for example refs/heads/prod). Every deploy job uses the same AWS role session name: github-actions-lambda-deploy.
Infrastructure provisioning (queues, IAM, SSM parameter names) lives in the infra repository. See Activity-log SQS and Go Lambda infrastructure.
No path filters
Every push toprod deploys every Lambda. Do not add on.push.paths or per-job path filters.
Path filters used to decide which workers to deploy. They drifted from the real Go import graph. For example, glossary-interchange imports internal/objectstore and memory-interchange imports internal/activitylog, but neither filter listed those packages. A change there would reach prod without redeploying the affected Lambda.
Concurrency
Deploy jobs use per-lambda concurrency groups, for examplelambda-deploy-glossary-interchange-refs/heads/prod, with cancel-in-progress: true. A newer push cancels only the same worker’s in-progress deploy, and the newer run redeploys that worker.
Push deploys also run ensure-deploy-main-tip after checkout. It skips the job when prod has moved past the run’s commit, so an older run never overwrites a newer deploy. workflow_dispatch runs skip the check.
Rules when changing the workflow
- Do add a dedicated
concurrencyblock on each deploy job when you add a new worker. - Do not make deploy jobs conditional on changed paths.
Adding a new worker
Use the create-sqs-lambda-worker skill. At minimum inlambda-deploy.yml:
- Add a deploy job with
if: github.ref == 'refs/heads/prod'. - Add job-level
concurrencywith a unique group name (lambda-deploy-<worker>-${{ github.ref }}). - Call
ensure-deploy-main-tipafter checkout. - Set
role-session-name: github-actions-lambda-deployon the new job’sconfigure-aws-credentialsstep (same value as every other deploy job onprod).
Do not change when launching a new Lambda
When you add a worker, extend the workflow. Do not refactor existing deploy jobs or shared CI behavior.- Do not use per-worker
role-session-namevalues. All Lambda deploy jobs onprodusegithub-actions-lambda-deployonly. - Do not change
role-session-nameon existing deploy jobs when adding a worker. - Do not add path filters.
- Do not remove
ensure-deploy-main-tipor per-job concurrency from existing workers. - Do not change existing concurrency group names for workers already in production.
AGENTS.md summarizes the same rules for automation.
Operations
Open the completed deploy job onprod. The Summarize step writes function name, S3 URI, version id, and commit SHA to the job summary.
