Concept and mechanism
A gradual release controls only traffic traversing the configured mechanism. With SAM and Lambda, publishing versions and configuring an alias does not force clients to use it. Calling the unqualified ARN reaches $LATEST, bypassing the alias path. Observe version identifiers, actual invocations, and service outcomes alongside the deployment chart. Published versions fix code and much configuration, but do not claim absolutely everything is frozen: operational exceptions exist, including runtime updates according to the configured mode. Explicitly define the object and configuration covered by evidence.
Guided application
SAM validation hooks need to report their result to CodeDeploy. A function finishing without error does not replace that callback. Prepare test failures, timeouts, alarms, and return decisions before the window. Deployment rollback also does not automatically undo data or files created by scripts. The previous version must remain compatible with existing state. In ECR, IMMUTABLE mode without exclusions prevents overwriting an existing tag; current exclusion options require checking the effective configuration. In ECS rolling deployments, the circuit breaker can return only to an eligible previous COMPLETED deployment. The first delivery may have no such target. The plan should explain what to do then.
An alias with almost no traffic does not establish canary success if clients invoke $LATEST.
Common pitfalls
Completed hook as callback; rollback as universal restoration; immutable tag without checking exclusions; presumed rollback target on the first deployment.
Related topics: IaC, drift, and reconciliation · Fleet automation and governance
Check traffic, persistent state, and recovery target before promotion.
Reference: SAM gradual deployment · DOP-C02