How would you deploy a serverless function safely (Lambda)?
IntermediateScenarioDeployment Strategies and GitOps
Answer
Situation read → Versioned, shiftable deploys.
What I'd do →
- Publish an immutable version and point an alias (
live) to it. - Use CodeDeploy traffic shifting:
Canary10Percent5Minuteswith CloudWatch alarms for rollback (via SAMDeploymentPreference). - Deploy infrastructure with IaC from the pipeline using OIDC.
Why → Aliases enable weighted traffic and instant rollback.
Interview tip → Versions are immutable, aliases are movable.