AWS Lambda deploy
Each connector ships as an OCI image that runs on AWS Lambda (container image runtime). Two lanes per connector share one ECR repo and one image:
| Lane | Function | Trigger |
|---|---|---|
| dev | woos-connectors-<connector>-dev |
Push to master (automatic) |
| prod | woos-connectors-<connector> |
workflow_dispatch with environment=prod |
Pipeline
.github/workflows/deploy-aws.yml runs on:
- Pushes to
masterthat touchmonoprix/,mcdonalds/, or the workflow itself. Lane is forced todev. workflow_dispatchwith inputsconnectorandenvironment(devorprod, defaultprod).
For each targeted connector it:
- Assumes the deploy role via GitHub OIDC
(
vars.CONNECTORS_DEPLOYER_ROLE_ARN, provisioned by the operations repo). - Logs in to ECR with
aws-actions/amazon-ecr-login. - Builds
linux/arm64withdocker buildxon a nativeubuntu-24.04-armrunner (no qemu) and pushes two tags towoos-connectors/<connector>:<sha>andlatest.--provenance=false --sbom=false --output type=image,push=true,oci-mediatypes=falsekeep the image a single Docker v2 manifest; Lambda rejects any OCI image-index. - Calls
aws lambda update-function-codeon the lane's function with the<sha>image URI, then waits withaws lambda wait function-updated-v2.
Image layout
Both Dockerfiles use public.ecr.aws/lambda/python:3.14 (the AWS-maintained
base image) and the canonical uv pattern from
docs.astral.sh/uv/guides/integration/aws-lambda/:
- A multi-stage build mounts
uv.lock+pyproject.toml, runsuv export --frozen --no-emit-workspace --no-dev --no-editableto produce an ephemeralrequirements.txt, and installs it withuv pip install --target "${LAMBDA_TASK_ROOT}". - The final stage copies
${LAMBDA_TASK_ROOT}and the application sources into the AWS Lambda runtime image.handler.handlerwraps the FastAPIapplicationin Mangum.
The base image already carries the AWS Lambda runtime API; no extra packages
are needed. curl_cffi on McDonald's installs from its prebuilt manylinux
arm64 wheels.
Rolling back
aws lambda update-function-code \
--function-name woos-connectors-<connector>[-dev] \
--image-uri <registry>/woos-connectors/<connector>:<older-sha>
Every build SHA stays in ECR under the connector repository (20 tagged images retained, 7 days for untagged).