Based on the DOP-C02 exam guideReport an error
Week 5 started from CodePipeline's structural design (Stage/Action/Artifact) and covered the Cross-Account IAM chain, the Lambda/Step Functions/Manual Approval extensions, and V2's dynamic features. Today we integrate all of it in exam-scenario format. Each question isn't about a single concept but is built at the intersection of several concepts—which is how the real DOP-C02 asks.
💡 Related theory: CodePipeline questions on the DOP-C02 exam ask "what do you choose in which situation" rather than "what features exist." It is effective to memorize the keywords of the selection criteria. "Over 15 minutes" → Step Functions. "Slack approval" → Manual Approval + Chatbot. "Automatic integration with an external system" → EventBridge. "Monorepo path filter" → V2 filePaths. "Preserve every commit's history" → QUEUED. "Deploy only the last commit" → SUPERSEDED. "KMS Access Denied" → missing KMS Key Policy. Training yourself to recognize these keyword-answer pairs saves exam time.
Every CodePipeline concept connects to "what problem does it solve, and how."
[Pipeline structure]
Pipeline > Stage > Action > Artifact
- Dependencies expressed as a DAG
- runOrder controls parallel/serial (same runOrder = parallel)
- Transition is a gate between Stages (can be disabled)
- Artifact: S3 + KMS CMK (encryption required)
- V1 → V2: pipeline type, variable system, trigger filters, Execution Mode
[Cross-Account 4-part permission chain]
1. Pipeline Service Role (Identity Policy: sts:AssumeRole → Spoke Role ARN)
↓
2. Spoke Trust Policy (Resource Policy: allow the Tooling Pipeline Role)
↓
3. Artifact S3 Bucket Policy (allow GetObject/PutObject for the Spoke Role)
↓
4. KMS Key Policy (allow kms:Decrypt, kms:DescribeKey for the Spoke Role)
└── Most often missed. Fails at the decryption step after S3 access succeeds
[Action Provider selection]
Lambda (< 15 min, simple) → put_job_result required → asynchronous pattern
Step Functions (15 min+, complex) → Saga pattern, WaitForTaskToken, Parallel
Manual Approval → SNS → Chatbot → Slack → PutApprovalResult
Custom Provider → Poll-based → integrating internal-network systems
EventBridge → external systems (PagerDuty, Jira, Datadog)
[V2 dynamic features]
Input variables (Pipeline Variables) → reuse per environment, validate with allowedPattern
Action Output Variables → #{ActionNamespace.VAR_NAME} format
Trigger filters (filePaths, branches, tags) → separate services in a monorepo
Execution Mode:
- SUPERSEDED: a new execution cancels the previous one (default)
- QUEUED: sequential execution, preserves all history
- PARALLEL: concurrent execution, requires independent targets
Stage conditions: beforeEntry (gate before entry), onSuccess (gate after completion)
CDK Pipelines → self-mutating, crossAccountKeys automation, Wave parallel deployment
| Compare A | Compare B | Decision criterion |
|---|---|---|
| Same runOrder | Different runOrder | Parallel vs. serial within a Stage |
| Action roleArn | Configuration.RoleArn | Who executes the Action vs. who creates CFN resources |
| SUPERSEDED | QUEUED | Deploy only the latest vs. all commit history |
| QUEUED | PARALLEL | Sequential preservation vs. concurrent independence |
| Lambda Invoke | Step Functions Invoke | Simple, 15 minutes or less vs. complex/long-running |
| Manual Approval | beforeEntry condition | Human judgment vs. automated gate |
| Branch Protection (GitHub) | Manual Approval | Code merge gate vs. deployment gate |
| CodeStar Notifications | EventBridge | Slack/SNS notifications vs. general-purpose event routing |
| S3 Bucket Policy | KMS Key Policy | Allowing object access vs. allowing decryption |
| CAPABILITY_IAM | CAPABILITY_NAMED_IAM | Auto-named IAM resources vs. explicitly named IAM resources |
| SERVICE_MANAGED StackSet | SELF_MANAGED StackSet | Organizations-integrated automation vs. manual Role setup |
⚠️ Trap: Patterns of "trap" options used on the exam. (1) A Cross-Account deployment KMS error → even if there's an option that modifies the S3 bucket policy, the KMS Key Policy is the correct answer. (2) "A task over 15 minutes" → extending the Lambda timeout (impossible, maximum 15 minutes) shows up as an option. (3) "Slack approval by senior engineers only" → modifying the Chatbot IAM Role shows up as an option, but Chatbot cannot map IAM per user. (4) "Build every commit + deploy only the last" → SUPERSEDED shows up as an option, but SUPERSEDED cancels the builds of earlier commits. You need training to recognize these traps.
A troubleshooting methodology for the 4-part permission chain. Check in order. (1) Did AssumeRole succeed? → In CloudTrail, check the "AssumeRole" event and its errorCode field. (2) Did S3 access succeed? → In CloudTrail, check the "GetObject" event and whether accessDenied occurred. (3) Did KMS decryption succeed? → In CloudTrail, check the "Decrypt" event and whether there was an error. (4) Did the CloudFormation API call succeed? → In CloudTrail, check the "CreateStack/UpdateStack" event. Permissions are in place up to the step before the one that errored. With this methodology you can pinpoint a KMS problem at step 3. CloudTrail's
errorCode: AccessDeniedanderrorMessage: User: ... is not authorized to perform: kms:Decryptare clear evidence.
A summary of CodePipeline adoption patterns by major AWS customers. Netflix: automatically deploys a Security Baseline to 1,500 accounts with StackSets + Organizations. Goldman Sachs: an Account Factory pipeline, onboarding a new account within 30 minutes. Stripe: a 4-step automated gate with Stage conditions (beforeEntry + onSuccess) cut deployment incidents by 70%. Shopify: differentiates Execution Mode by service type (payments QUEUED, frontend SUPERSEDED, test environments PARALLEL). Airbnb: used Step Functions WaitForTaskToken to cut Slack approval time from 2 hours to 15 minutes. These cases are the real-world background of DOP-C02 scenarios.
Click a choice to reveal the answer and explanation.
Question 1
A CodePipeline in the Tooling account deploys an ECS service to the Prod account. "The deploy Action started without any IAM Policy error, but the following error occurs during the Artifact download step: Client error: KMS key access denied when decrypting artifact". What are the cause and the fix?
Question 2
A company manages 100 microservices in a single Git repository (monorepo). Each service has its own independent CodePipeline. A change in shared/auth/ must trigger all 100 pipelines, and a change in services/checkout/ must trigger only the checkout pipeline. What is the most appropriate V2 trigger configuration?
Question 3
A financial services company has the requirement: "Every prod deployment must pass two automated gates: (1) the error rate alarm must be in OK state before deployment, (2) the error rate alarm must stay in OK state for 5 minutes after deployment. If either gate fails, automatically roll back." What is the most appropriate implementation?
Question 4
A team wants to implement a pattern where "only senior engineers have permission to approve prod deployments, and approval happens in Slack." When using AWS Chatbot, how can you control approval permission at a fine-grained user level?
Question 5
A State Machine using a Step Functions Action in CodePipeline must, during execution, "pause the deployment until a Change Request in the external change management system (ServiceNow) is approved." What is the most appropriate way for the State Machine to implement this wait?
Question 6
A team managing its pipeline with CDK Pipelines wants to satisfy both the requirement "Manual Approval is mandatory before production deployment" and the requirement "staging deployment is fully automatic." How is this implemented in the CDK Pipelines code?
Question 7
The Pipeline is currently running in SUPERSEDED mode. What happens when 10 commits are pushed in quick succession?
Question 8
A team set up a multi-Region pipeline. It builds in ap-northeast-2 and deploys to us-east-1 and eu-west-1 at the same time. If the deploy Actions in both Regions fail, what should you check?
Question 9
In one pipeline, a Build Action builds multiple microservice Docker images and the subsequent Deploy Action must use each image's tag. In a V2 Pipeline, what is the most appropriate approach?
Question 10
In a hybrid pattern of "run PR builds and tests with GitHub Actions, and deploy to prod through CodePipeline only on a merge to the main branch," what is the most secure and simple way to implement the handoff from GitHub Actions to CodePipeline?
Question 11
While deploying to 50 accounts using StackSets in SERVICE_MANAGED mode, the following error occurs: "You must be an administrator of an Organization to use this operation." What is the cause?
Question 12
A team faces the problem "a Lambda Invoke Action calls an external deployment system and it takes 45 minutes to complete." Which of the following is an INCORRECT way to get around Lambda's 15-minute limit while making the pipeline wait for the 45-minute completion?
We move on to container CI/CD. ECR image scanning and lifecycle management, automated Rolling/Blue-Green deployment for ECS, GitOps (ArgoCD/Flux) patterns for EKS, and App Runner's abstracted container service—these four are the pillars of Week 6. The CodePipeline we learned in Week 5 continues to appear as the orchestrator of all of this.