# Blue/green vs canary vs rolling — deployment decision matrix

Score **0** (no), **1** (partial), **2** (yes). Sum per strategy column.

| Criterion | Weight | Blue/green | Canary / linear | Rolling (in-place) |
|-----------|--------|------------|-----------------|---------------------|
| Need **instant rollback** (&lt;60s traffic revert) | 3 | | | |
| Change is **high risk** (schema, auth, pricing) | 3 | | | |
| **Database migration** in same release | 2 | | | |
| Team has **CloudWatch alarms** on error rate + latency | 2 | | | |
| Compute is **Lambda** with alias + CodeDeploy | 2 | | | |
| Compute is **ECS/Fargate** with CodeDeploy controller | 2 | | | |
| **Stateful sessions** on instances (sticky) | 2 | | | |
| Deploy window must finish in **&lt;15 min** | 2 | | | |
| Cost of **2× capacity** during deploy is unacceptable | 2 | | | |
| Only **ConfigMap / env** change (low risk) | 2 | | | |

## Interpretation

- **Blue/green:** Sum ≥14 and instant rollback is mandatory; pair with ECS CodeDeploy or dual Lambda aliases.
- **Canary / linear:** Sum ≥14 on canary column and you have alarms + hooks; use SAM `DeploymentPreference` or CodeDeploy canary/linear configs.
- **Rolling:** Sum ≥12 on rolling **and** low risk; acceptable for internal tools with maintenance windows—not default for revenue APIs.

## AWS mapping (May 2026)

| Strategy | ECS/Fargate | Lambda | EKS (common) |
|----------|-------------|--------|--------------|
| Blue/green | CodeDeploy deployment controller | Two aliases, cutover | Argo Rollouts / Flagger |
| Canary | CodeDeploy linear/canary hooks | CodeDeploy + weighted alias | Flagger / ALB weighted |
| Rolling | ECS rolling update (`minimumHealthyPercent`) | Publish version only (no alias shift) | Rolling update |

**Deprecated path:** AWS App Mesh traffic shifting — **end of life September 30, 2026**; migrate to **ECS Service Connect** (ECS-native) or **VPC Lattice** (cross-VPC/account).
