Amazon DOP-C02: CI/CD Pipelines and Deployment Strategies — Study Guide

Part of the AWS DevOps Engineer Professional DOP-C02 — Study Guide. Practice with verified answers in the Amazon exam hub, or take timed practice tests on ExamRoll.io.

Overview

A robust CI/CD system on AWS ties together source control, build, test, artifact governance, deployment orchestration, and safe release strategies across multiple accounts and Regions. The core managed services—CodeCommit, CodeArtifact, CodeBuild, CodePipeline, and CodeDeploy—remove server maintenance, integrate tightly with IAM and KMS, and provide first-class support for blue/green, canary, rolling, and in-place deployments to EC2/Auto Scaling, ECS, and Lambda. Effective pipelines also rely on precise triggers (webhooks, EventBridge, schedules), disciplined artifact management, build caching for speed, and opinionated traffic shifting with health alarms for automatic rollback. For enterprises, cross-account and cross-Region patterns are mandatory, requiring role assumption, regional artifact stores, and consistent encryption policies.

Orchestration with AWS Developer Tools

Use CodeCommit as a private, highly available Git service. It integrates with EventBridge for repository and pull request events, supports approval rule templates, and uses IAM for fine-grained authorization. For third-party Git (GitHub/Bitbucket), configure CodePipeline source actions with webhooks for near-real-time triggers.

CodeArtifact centralizes package management for multiple ecosystems (npm, Maven, PyPI, NuGet). It supports upstream connections to public registries with caching, per-repository KMS encryption, and scoped auth tokens that expire automatically. Integrate in CodeBuild by invoking aws codeartifact login during pre_build to configure package managers without embedding long-lived secrets.

CodeBuild provides ephemeral, containerized builds without managing workers. Key capabilities:

CodePipeline is the orchestrator. Define stages (source, build, test, deploy, approval) with actions that can run in parallel or sequence. Best practices:

CodeDeploy is the deployment engine supporting EC2/on-prem, ECS, and Lambda targets. It manages lifecycle hooks, traffic shifting, health checks, and automatic rollback via CloudWatch alarms. Ensure EC2 instances run the CodeDeploy agent, have an instance profile, and outbound connectivity to CodeDeploy endpoints (or egress via NAT). Skipped events and no-op deployments often indicate agent/permission/connectivity problems.

Deployment Strategies and CodeDeploy Lifecycle

Choose the strategy by risk, capacity, and platform:

CodeDeploy appspec.yml defines what to install and when to run scripts:

Traffic shifting and rollback:

Blue/Green and Traffic Shifting for EC2, ECS, and Lambda

EC2/Auto Scaling:

ECS:

Lambda:

Weighted routing beyond CodeDeploy:

Multi-Account and Multi-Region Delivery

Enterprise pipelines typically reside in a centralized “tooling” account, deploying to dev/test/prod accounts across multiple Regions:

Security, artifacts, and governance:

Practical Problem Scenario

Spotify needs safer releases across hundreds of microservices with a mixed compute substrate (ECS on Fargate, EC2-based services, and Lambda). They require canary and blue/green deployments with automated tests before production traffic, artifact governance, and multi-Region promotion while keeping prod in a separate account.

  1. Establish repositories and packages
  1. Build and test
  1. Orchestrate pipelines
  1. Blue/green and canary deployments
  1. Cross-account and cross-Region promotion
  1. Artifact governance and security
  1. Observability and notifications

This design unifies heterogeneous runtimes under a single managed toolchain, provides safe rollout strategies with automated verification, reduces maintenance by eliminating self-hosted CI/CD infrastructure, and scales globally with clear separation of duties.


All domains · Infrastructure as Code and Configuration Management

Practice these questions → · Timed practice on ExamRoll.io →

Pass the whole exam — not just this question

You found this answer. Get every verified question and explanation in one place, and save hours of prep. Free to start.

Pass your exam →

Browse Amazon →

Related guides

All-in-one access

One subscription. Every exam.

Every plan unlocks unlimited answer search, practice tests, AI explanations, and the full resource library — in 20+ languages.

Monthly
24.87
Just €0.83/day
Everything included:
  • Unlimited answer search
  • Unlimited practice tests
  • AI-powered explanations
  • Full resource library
  • 20+ languages
  • Weekly content updates
  • Rewards & referrals
  • Priority support
Start free trial

No credit card required*

Best value
12 months
179.87
Just €0.49/daySave 40%
Everything included:
  • Unlimited answer search
  • Unlimited practice tests
  • AI-powered explanations
  • Full resource library
  • 20+ languages
  • Weekly content updates
  • Rewards & referrals
  • Priority support
Start free trial

No credit card required*

✓ Free plan included · ✓ Cancel anytime · ✓ All plans unlock the full product