Deployment strategy selection and troubleshooting
Exam alignment: DOP-C02 Domain 1 task statements for pipelines, testing, artifacts, or deployment.
Learning objective
Select strategies by platform, risk, capacity, validation, and rollback, then diagnose evidence systematically.
| Difficulty / Schwierigkeitsgrad | Advanced |
| Study time / Lernzeit | 120 minutes |
| Prerequisites / Voraussetzungen | Previous lessons in this volume |
Professional scenario
EC2, ECS, and Lambda teams each need different release behavior.
Core concepts
- In-place modifies live hosts.
- Rolling replaces part of current capacity.
- Blue/green preserves old and new environments.
- Canary and linear progressively expose a version.
Architecture flow
- Identify the release input and immutable identity.
- Select the managed AWS control plane and least-privilege role.
- Execute build, test, artifact, or deployment work.
- Collect service events, logs, reports, and runtime metrics.
- Stop, retry, or roll back according to explicit rules.
Decision matrix
| Requirement | Preferred choice | Reason |
|---|---|---|
| EC2 with little spare capacity | In-place if downtime allowed | Avoid duplicate fleet |
| ECS pre-traffic test | Blue/green | Validate green |
| Lambda 10% first | Canary alias | Weighted native rollout |
Failure modes and troubleshooting
- Wrong artifact version.
- Deployment role or runtime role is missing permissions.
- Target is healthy but business metric fails.
Security and operations
- Use short-lived service roles and least privilege.
- Encrypt artifacts and protect logs from secret exposure.
- Record changes and approvals for audit.
Hands-on lab
Goal / Ziel: Solve six platform scenarios and one game day.
Tasks
- Create the smallest safe test architecture.
- Implement or simulate the main workflow.
- Introduce one controlled failure.
- Diagnose it from service evidence.
- Document cleanup and one improvement.
Validation
- The workflow uses an immutable version.
- A required failure blocks promotion.
- The diagnosis identifies the first failed transition.
Cost control / Kostenkontrolle: Keep resources short lived; read cleanup before starting.
Cleanup
- Delete pipeline/build/deployment resources.
- Delete temporary artifacts, images, logs, and roles.
Exam traps
- One strategy for all platforms.
- Random configuration changes instead of evidence.
Key takeaways
- In-place modifies live hosts.
- Canary and linear progressively expose a version.
- Decisions must be justified by requirements and failure behavior.
Review questions
- What is the immutable release identity?
- Which evidence proves failure or success?
- What is the safest recovery action?
Answers
- A version, digest, or uniquely versioned artifact.
- Service events, logs, reports, health checks, and runtime metrics.
- Restore the known-good version using the configured rollback path.