CertNote/ Commute Study Notes
Roadmap
KOEN
CLF-C02 · FoundationalCloud Practitioner - Foundational
DVA-C02 · AssociateDeveloper - Associate
SAA-C03 · AssociateSolutions Architect - Associate
SOA-C02 · AssociateCloudOps Engineer - Associate
SAP-C02 · ProfessionalSolutions Architect - Professional
DOP-C02 · ProfessionalDevOps Engineer - Professional
  • Week 1
    • 1.DevOps as an Operating Model: The Five Axes of CALMS and the Truth DORA Proved Through Measurement
    • 2.Well-Architected Framework: Rereading It Through the Six Lenses of DevOps
    • 3.The AWS DevOps Tool Map: The Code* Series and the Real Picture Beyond It
    • 4.Multi-Account Strategy: The Real Picture of Organizations, Control Tower, and IAM Identity Center
    • 5.Week 1 Wrap-Up: Cementing the DevOps Thinking Frame with Scenarios
  • Week 2
  • Week 3
  • Week 4
  • Week 5
    • 1.CodePipeline Architecture: Understanding Why Stage, Action, and Artifact Were Designed This Way
    • 2.Multi-Account Pipeline: Why Cross-Account IAM Is Required
    • 3.Action Providers: How Lambda, Step Functions, and Manual Approval Extend the Pipeline
    • 4.Dynamic Pipeline: V2 Variable System, Trigger Filters, and Execution Mode Design
    • 5.Week 5 Review: CodePipeline Integration Scenarios
  • Week 6
  • Week 7
  • Week 8
  • Week 9
  • Week 10
  • Week 11
  • Week 12
  • Week 13
  • Week 14
  • Week 15
  • Week 16
Linux Master 2 · 2급KAIT Linux Master - Level 2
SCS-C03 · SpecialtySecurity - Specialty
Linux Master 1 · 1급KAIT Linux Master - Level 1
MLA-C01 · AssociateMachine Learning Engineer - Associate
AIF-C01 · FoundationalAI Practitioner - Foundational
DEA-C01 · AssociateData Engineer - Associate
MLS-C01 · SpecialtyMachine Learning - Specialty
SQLD · 개발자SQL Developer (SQLD)

© CertNote · 주간랩스

  • About
  • Changelog
  • Contact
  • Terms
  • Privacy
← DOP-C02/Week 5/Day 5

Based on the DOP-C02 exam guide·Report an error

DOP-C02· ProWeek 5 · Day 5~40 min read

Day 5 - Week 5 Review: CodePipeline Integration Scenarios

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.

Week 5 Key Concept Map

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

Commonly Confused Concepts Compared

Compare ACompare BDecision criterion
Same runOrderDifferent runOrderParallel vs. serial within a Stage
Action roleArnConfiguration.RoleArnWho executes the Action vs. who creates CFN resources
SUPERSEDEDQUEUEDDeploy only the latest vs. all commit history
QUEUEDPARALLELSequential preservation vs. concurrent independence
Lambda InvokeStep Functions InvokeSimple, 15 minutes or less vs. complex/long-running
Manual ApprovalbeforeEntry conditionHuman judgment vs. automated gate
Branch Protection (GitHub)Manual ApprovalCode merge gate vs. deployment gate
CodeStar NotificationsEventBridgeSlack/SNS notifications vs. general-purpose event routing
S3 Bucket PolicyKMS Key PolicyAllowing object access vs. allowing decryption
CAPABILITY_IAMCAPABILITY_NAMED_IAMAuto-named IAM resources vs. explicitly named IAM resources
SERVICE_MANAGED StackSetSELF_MANAGED StackSetOrganizations-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: AccessDenied and errorMessage: User: ... is not authorized to perform: kms:Decrypt are 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.

📝 Practice Questions

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?

Week 5 Key Checklist

CodePipeline structure

  • The meaning and role of each layer in the Stage > Action > Artifact hierarchy
  • Same runOrder = parallel, different = serial
  • Implementing a gate between Stages by disabling a Transition
  • The 6 Action categories and each one's representative Provider
  • V1 vs. V2 differences: pipeline type, variables, trigger filters, Execution Mode

Cross-Account IAM

  • The required 4 parts: Pipeline AssumeRole + Spoke Trust + S3 Policy + KMS Key Policy
  • Action roleArn (who executes the Action) vs. Configuration.RoleArn (who creates CFN resources)
  • The KMS Key Policy is the most often missed — because of Envelope Encryption
  • Prevent Confused Deputy with PrincipalTag / aws:SourceArn / ExternalId
  • CAPABILITY_IAM vs. CAPABILITY_NAMED_IAM

Action Provider selection

  • Lambda: 15 minutes or less, simple logic, put_job_result required
  • Step Functions: over 15 minutes, branching/parallel/retry, Saga pattern, WaitForTaskToken
  • Manual Approval: SNS → Chatbot → Slack, default timeout 7 days
  • EventBridge: external system integration (PagerDuty, Jira, Datadog)
  • Custom Provider: poll-based, integrating internal-network systems

V2 dynamic features

  • Input variables: reuse a pipeline per environment, allowedPattern validation
  • Trigger filters (filePaths, branches, tags, PR events): monorepo support
  • SUPERSEDED (default, latest first) / QUEUED (preserve history) / PARALLEL (concurrent, independent): selection criteria by situation
  • beforeEntry/onSuccess conditions: automated deployment gates, CloudWatch Alarm Rule Provider
  • CDK Pipelines: self-mutating, crossAccountKeys automation, Wave parallel deployment

StackSets

  • SERVICE_MANAGED: Organizations management/Delegated Admin accounts only, supports Auto-Deployment
  • SELF_MANAGED: manual Role setup, usable without Organizations
  • MaxConcurrentPercentage (speed control) vs. FailureTolerancePercentage (safety control)

Next Week Preview (Week 6)

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.

PreviousDynamic Pipeline: V2 Variable System, Trigger Filters, and Execution Mode DesignWeek 5 · Day 4Next ECR: Solving the Problems that Container Image Registries Must SolveWeek 6 · Day 1

Official references

  • DOP-C02 official exam page(opens in a new tab)
  • AWS CodePipeline documentation(opens in a new tab)
  • AWS IAM documentation(opens in a new tab)
  • AWS Lambda documentation(opens in a new tab)
  • AWS KMS documentation(opens in a new tab)
  • AWS Step Functions documentation(opens in a new tab)

On this page

  • Week 5 Key Concept Map
  • Commonly Confused Concepts Compared
  • 12 Scenario Questions
  • Week 5 Key Checklist
  • CodePipeline structure
  • Cross-Account IAM
  • Action Provider selection
  • V2 dynamic features
  • StackSets
  • Next Week Preview (Week 6)