CICD-267 · AWS Lambda deployment
Encyclopedia · Cloud infrastructure integration · All snippets
Previous · CICD-266 · Next · CICD-268
1. Where it fits
- Placement CI run step or authorized lab terminal.
- Prerequisites provider CLI, scoped CI identity, test environment and provider configuration for named resource.
- Platforms github-actions, cloud-cli.
- Parameters
LAMBDA_NAME.
2. Copy the snippet
bash
aws lambda update-function-code --function-name "${LAMBDA_NAME:?}" --zip-file fileb://dist/function.zip >/dev/null
aws lambda wait function-updated --function-name "$LAMBDA_NAME"
aws lambda publish-version --function-name "$LAMBDA_NAME" --query Version --output text3. How it works
The Lambda CLI updates or inspects a function revision. Keep version verification separate from alias promotion.
4. Verify the result
Deploy to a test function. Smoke-test the published version before moving an alias.
Validation syntax-validated (Bash parse). Status definitions.