SDLC Automation (22%)
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.
| Task | Statement |
|---|---|
| 1.1 | Implement CI/CD pipelines |
| 1.2 | Integrate automated testing into CI/CD pipelines |
| 1.3 | Build and manage artifacts |
| 1.4 | Implement 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
| Component | Where It Lives | Why It Matters |
|---|---|---|
| Pipeline and artifact bucket | Central tools or DevOps account | One place to build and promote |
| Customer managed KMS key | Tools account, shared by key policy | Default key can't be shared cross-account |
| Cross-account deploy role | Each target account (dev, test, prod) | Pipeline assumes it to deploy |
| CloudFormation execution role | Each target account | Least privilege for stack changes |
| Bucket policy | Artifact bucket | Lets target roles read artifacts |
| Promotion stages | Dev, then test, then prod with approval | Same 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 Type | Stage | Aws Tooling |
|---|---|---|
| Unit tests and coverage | Every commit and pull request | CodeBuild test and coverage reports |
| Static and security scans | Build stage | Inspector for ECR images, linters, cfn-lint, Guard |
| Integration tests | After deploy to a test environment | CodeBuild calling the deployed stack |
| Acceptance and UI tests | Staging, before approval | Headless browsers in CodeBuild; Synthetics canaries |
| Load and stress tests | Pre-production at scale | Distributed Load Testing on AWS, FIS experiments |
| Health from exit codes | Every action | Non-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
| Platform | Options | Rollback |
|---|---|---|
| EC2 with CodeDeploy | In-place (AllAtOnce, HalfAtATime, OneAtATime) or blue/green | Redeploy last revision; alarm rollback |
| Lambda | Alias traffic shifting: canary, linear, all at once | Shift alias back instantly |
| Amazon ECS | Rolling, or blue/green with canary or linear shifts | Traffic returns to blue tasks |
| Amazon EKS | Rolling updates, blue/green services, canary with a mesh or ALB | kubectl rollout undo; switch service |
| Elastic Beanstalk | All at once, rolling, rolling + batch, immutable, traffic splitting | Swap environment URLs for blue/green |
| Mutable vs immutable | Patch in place vs replace instances or images | Immutable 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
| Symptom | Likely Cause | Fix |
|---|---|---|
| Deployment stuck, no instances | CodeDeploy agent missing or stopped | Install the agent via Systems Manager |
| Agent can't download revision | Instance profile lacks S3 or KMS access | Grant s3:GetObject and kms:Decrypt |
| ValidateService hook fails | App unhealthy; script exits non-zero | Read hook logs; fix app or script |
| Lambda hook fails | BeforeAllowTraffic or AfterAllowTraffic test failed | Fix the test function or the code |
| Automatic rollback triggered | CloudWatch alarm entered ALARM | Investigate metric; redeploy fix |
| Blue/green ASG has wrong instances | Launch template or tags out of date | Update 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
- Database passwords in buildspec env variables in plain text. Secrets Manager or Parameter Store references.
- Sharing artifacts across accounts with the default aws/s3 key. A customer managed KMS key.
- Rebuilding the artifact separately for each environment. Build once, promote the same artifact.
- SSH into servers to copy new code during a release. CodeDeploy or immutable images.
- Updating Lambda code in place for a risky change. Alias with canary and alarm rollback.
- 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
- 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 answerHide answer
Answer
CodePipeline V2 trigger with file paths.Shift 10% of Lambda traffic for 5 minutes, then the rest.Show answerHide answer
Answer
CodeDeploy Canary10Percent5Minutes.Proxy public npm packages for builds with no internet access.Show answerHide answer
Answer
CodeArtifact upstream and VPC endpoint.Expire untagged container images older than 14 days.Show answerHide answer
Answer
ECR lifecycle policy.Deploy from a tools account into three workload accounts.Show answerHide answer
Answer
Cross-account roles and a shared CMK.