Skip to content
AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep

Lesson 1 of 6 · 15 min

x
1/6

SDLC Automation (22%)

Video lesson: DOP-C02 Domain 1: SDLC Automation

Domain 1 is 22% of the scored content of the AWS Certified DevOps Engineer – Professional (DOP-C02) exam. AWS facts were checked against current AWS documentation in November 2026.

TaskStatement
1.1Implement CI/CD pipelines
1.2Integrate automated testing into CI/CD pipelines
1.3Build and manage artifacts
1.4Implement deployment strategies for instance, container, and serverless environments

Overview

Domain 1: SDLC Automation AWS Certified DevOps Engineer – Professional (DOP-C02): pipelines, tests, artifacts and deployment strategies

Welcome to Domain 1 of the AWS Certified DevOps Engineer Professional exam, DOP-C02: SDLC Automation. It is the largest domain, 22 percent of the scored content, about 14 of the 65 scored questions.

Task 1.1 is implementing C I C D pipelines: source repositories, CodePipeline and CodeBuild, build secrets, and single and multi-account pipeline patterns.

Task 1.2 is automated testing: the right test at the right stage, builds on pull requests, load tests, coverage, and health from exit codes.

Task 1.3 is building and managing artifacts in CodeArtifact, Amazon E C R and S3, including image pipelines with EC2 Image Builder.

Task 1.4 is deployment strategies for EC2, E C S, E K S and Lambda: in-place, blue green, canary and linear, plus troubleshooting failed deployments.

A theme across the domain: alarms stop bad releases and roll them back automatically.

The key: build once, promote the same artifact, and prefer immutable deployments over patching servers in place.

Exam key takeaway: Domain 1 tests building multi-account pipelines with secrets, testing at each stage, storing artifacts, and choosing and troubleshooting deployment strategies with automatic rollback.

1.1 Implement CI/CD pipelines

Pipeline Building Blocks Task 1.1 · Sources, orchestration, builds and secrets

  • Source repositories: Task 1.1 starts with source. Pipelines pull from CodeCommit, which is open to new customers again since November 2025, or from GitHub, GitLab and Bitbucket through AWS CodeConnections, formerly CodeStar Connections.
  • AWS CodePipeline: CodePipeline orchestrates stages: source, build, test, manual approval and deploy. Version two pipelines add triggers on branches, tags and file paths, pipeline variables, and queued or parallel execution modes.
  • AWS CodeBuild: CodeBuild runs the build from a buildspec file with install, pre build, build and post build phases, and adds test reports, caching, V P C access and batch builds.
  • Build secrets: Build secrets come from Parameter Store or Secrets Manager, referenced in the buildspec env section, never stored in source code or plain environment variables.
  • Approvals and gates: Gates use a manual approval action that notifies through S N S, or automated checks such as test results and CloudWatch alarms.
  • Triggers and events: Pipelines start on pushes, pull requests, tags or schedules, and every pipeline state change is an EventBridge event you can notify or act on.

Exam key takeaway: Pull source through CodeConnections or CodeCommit, orchestrate with CodePipeline V2, build with a buildspec, inject secrets from Secrets Manager or Parameter Store, and gate with approvals.

Multi-Account Pipeline Patterns Task 1.1 · One pipeline in a tools account deploying to many accounts

ComponentWhere It LivesWhy It Matters
Pipeline and artifact bucketCentral tools or DevOps accountOne place to build and promote
Customer managed KMS keyTools account, shared by key policyDefault key can't be shared cross-account
Cross-account deploy roleEach target account (dev, test, prod)Pipeline assumes it to deploy
CloudFormation execution roleEach target accountLeast privilege for stack changes
Bucket policyArtifact bucketLets target roles read artifacts
Promotion stagesDev, then test, then prod with approvalSame artifact moves forward

Task 1.1 also covers multi-account pipelines. The pipeline and its artifact bucket live in a central tools account.

Artifacts are encrypted with a customer managed K M S key whose key policy grants the target accounts, because the default A W S managed key can't be shared across accounts.

Each target account has a deployment role that trusts the tools account, which the pipeline assumes to deploy there.

A separate CloudFormation execution role in each target account holds only the permissions the stacks need.

The artifact bucket policy lets those target roles read the artifacts.

Stages promote the same artifact from dev to test to production, usually with an approval before production.

Exam key takeaway: Central pipeline and bucket, a shareable customer managed KMS key, deploy and CloudFormation roles in each account, a bucket policy for them, and promotion of one artifact.

1.2 Integrate automated testing into CI/CD pipelines

Testing in the Pipeline Task 1.2 · The right test at the right stage

Test TypeStageAws Tooling
Unit tests and coverageEvery commit and pull requestCodeBuild test and coverage reports
Static and security scansBuild stageInspector for ECR images, linters, cfn-lint, Guard
Integration testsAfter deploy to a test environmentCodeBuild calling the deployed stack
Acceptance and UI testsStaging, before approvalHeadless browsers in CodeBuild; Synthetics canaries
Load and stress testsPre-production at scaleDistributed Load Testing on AWS, FIS experiments
Health from exit codesEvery actionNon-zero exit fails the build or hook

Task 1.2 is testing. Unit tests and code coverage run on every commit and pull request, with CodeBuild publishing test and coverage reports.

Static analysis and security scans run at build time: Amazon Inspector scans container images in E C R, and linters, cfn-lint and CloudFormation Guard check code and templates.

Integration tests run after deploying to a test environment, often a CodeBuild action that calls the deployed services.

Acceptance and user interface tests run in staging before approval, using headless browsers in CodeBuild or CloudWatch Synthetics canaries.

Load and stress tests run in pre-production at scale, for example with the Distributed Load Testing on A W S solution, and resilience tests with A W S Fault Injection Service.

Every action reports health through exit codes: a non-zero exit code fails the CodeBuild build or the CodeDeploy hook and stops the pipeline.

Exam key takeaway: Unit tests and coverage on every pull request, scans at build, integration after test deploys, UI tests in staging, load tests before production, and exit codes that stop bad builds.

1.3 Build and manage artifacts

Building and Managing Artifacts Task 1.3 · Where artifacts live and how they age

  • AWS CodeArtifact: Task 1.3 is artifacts. CodeArtifact stores packages such as npm, PyPI and Maven, proxies public registries through upstream repositories and external connections, and shares packages across accounts through domains.
  • Amazon ECR: Amazon E C R stores container images with scanning, immutable tags, and cross-Region or cross-account replication; lifecycle policies expire old images.
  • Amazon S3: Amazon S3 holds zip bundles, templates and Lambda packages, with versioning, lifecycle rules and K M S encryption.
  • EC2 Image Builder: EC2 Image Builder automates A M I and container image builds with test stages, on a schedule or when a new base image appears.
  • Secure access: Secure artifact access with repository policies and least-privilege roles; CodeArtifact uses short-lived authorization tokens.
  • Build once, promote: Build once and promote the same artifact through every stage, tagged with the commit I D or version so you can trace and roll back.

Exam key takeaway: Use CodeArtifact for packages, ECR for images with scanning and lifecycle policies, S3 for bundles, Image Builder for AMIs, least-privilege access, and promote one traceable artifact.

1.4 Implement deployment strategies for instance, container, and serverless environments

Deployment Strategies by Platform Task 1.4 · Pick the strategy for the platform, risk and rollback needs

PlatformOptionsRollback
EC2 with CodeDeployIn-place (AllAtOnce, HalfAtATime, OneAtATime) or blue/greenRedeploy last revision; alarm rollback
LambdaAlias traffic shifting: canary, linear, all at onceShift alias back instantly
Amazon ECSRolling, or blue/green with canary or linear shiftsTraffic returns to blue tasks
Amazon EKSRolling updates, blue/green services, canary with a mesh or ALBkubectl rollout undo; switch service
Elastic BeanstalkAll at once, rolling, rolling + batch, immutable, traffic splittingSwap environment URLs for blue/green
Mutable vs immutablePatch in place vs replace instances or imagesImmutable rolls back by switching

Task 1.4 is deployment strategies. CodeDeploy on EC2 deploys in place with all at once, half at a time or one at a time configurations, or blue green with a replacement Auto Scaling group, rolling back on alarms.

Lambda deployments shift alias traffic with canary, linear or all-at-once configurations, such as ten percent for five minutes, and roll back by moving the alias.

Amazon E C S supports rolling updates and blue green deployments with canary or linear traffic shifts, natively or through CodeDeploy, returning traffic to the blue tasks on failure.

Amazon E K S uses Kubernetes rolling updates, blue green services, or canaries through load balancer weights, rolling back with rollout undo.

Elastic Beanstalk offers all at once, rolling, rolling with an additional batch, immutable and traffic splitting, and blue green by swapping environment U R Ls.

Mutable deployments change servers in place; immutable ones replace instances or images, so rollback is just switching back.

Exam key takeaway: CodeDeploy for EC2 in place or blue/green, alias shifting for Lambda, blue/green with canary for ECS, rollout undo for EKS, Beanstalk policies, and prefer immutable for easy rollback.

CodeDeploy Hooks and Troubleshooting Task 1.4 · AppSpec lifecycle hooks and common failures

SymptomLikely CauseFix
Deployment stuck, no instancesCodeDeploy agent missing or stoppedInstall the agent via Systems Manager
Agent can't download revisionInstance profile lacks S3 or KMS accessGrant s3:GetObject and kms:Decrypt
ValidateService hook failsApp unhealthy; script exits non-zeroRead hook logs; fix app or script
Lambda hook failsBeforeAllowTraffic or AfterAllowTraffic test failedFix the test function or the code
Automatic rollback triggeredCloudWatch alarm entered ALARMInvestigate metric; redeploy fix
Blue/green ASG has wrong instancesLaunch template or tags out of dateUpdate template; redeploy

Task 1.4 also covers troubleshooting. If an EC2 deployment never starts on instances, the CodeDeploy agent is missing or stopped; install it with Systems Manager.

If the agent can't download the revision, the instance profile lacks S3 read or K M S decrypt permissions.

AppSpec hooks run in order: ApplicationStop, BeforeInstall, AfterInstall, ApplicationStart and ValidateService. A failing ValidateService script exits non-zero; read its log on the instance.

For Lambda and E C S, BeforeAllowTraffic and AfterAllowTraffic hooks run test functions; a failure stops the shift and rolls back.

An automatic rollback means a configured CloudWatch alarm fired during deployment; investigate the metric before redeploying.

If blue green creates instances with the wrong configuration, the copied Auto Scaling group or launch template is out of date.

Exam key takeaway: Missing agent, missing S3 or KMS rights, failing hook scripts, failing traffic hooks and alarm rollbacks explain most CodeDeploy failures; read hook logs and fix the cause.

Review

Exam Distractors: What to Reject Answers that work once but don't scale, aren't secure or can't roll back

  1. Database passwords in buildspec env variables in plain text. Secrets Manager or Parameter Store references.
  2. Sharing artifacts across accounts with the default aws/s3 key. A customer managed KMS key.
  3. Rebuilding the artifact separately for each environment. Build once, promote the same artifact.
  4. SSH into servers to copy new code during a release. CodeDeploy or immutable images.
  5. Updating Lambda code in place for a risky change. Alias with canary and alarm rollback.
  6. Using OpsWorks or CodeStar for new pipelines. CodePipeline, CodeBuild and Systems Manager.

Exam key takeaway: Reject plaintext build secrets, the default KMS key across accounts, per-environment rebuilds, SSH releases, all-at-once Lambda updates, and retired OpsWorks or CodeStar.

Where current AWS differs from the exam guide

  • AWS CodeStar (in-scope service list) stopped on July 31, 2024; CodeStar Connections continues as AWS CodeConnections.
  • AWS CodeCommit is open to new customers again since November 24, 2025.
  • AWS Fault Injection Simulator is now named AWS Fault Injection Service.

References

  1. AWS Certified DevOps Engineer – Professional exam page — checked Nov 30, 2026

Check your understanding

  • Run a pipeline only when files under infra/ change on main.Show answer

    Answer

    CodePipeline V2 trigger with file paths.
  • Shift 10% of Lambda traffic for 5 minutes, then the rest.Show answer

    Answer

    CodeDeploy Canary10Percent5Minutes.
  • Proxy public npm packages for builds with no internet access.Show answer

    Answer

    CodeArtifact upstream and VPC endpoint.
  • Expire untagged container images older than 14 days.Show answer

    Answer

    ECR lifecycle policy.
  • Deploy from a tools account into three workload accounts.Show answer

    Answer

    Cross-account roles and a shared CMK.

Progress is saved in this browser.

Next Lesson