Interview Prep/CI/CD/Deployment Strategies and GitOps

How would you deploy a serverless function safely (Lambda)?

IntermediateScenarioDeployment Strategies and GitOps
Answer

Situation read → Versioned, shiftable deploys.

What I'd do →

  1. Publish an immutable version and point an alias (live) to it.
  2. Use CodeDeploy traffic shifting: Canary10Percent5Minutes with CloudWatch alarms for rollback (via SAM DeploymentPreference).
  3. 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.

All CI/CD questions Roadmap: CI/CD fundamentals

More on Deployment Strategies and GitOps