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
  • Week 6
  • Week 7
  • Week 8
    • 1.CloudFormation Advanced: Nested·Cross-Stack and the Deep Story of Modularization
    • 2.StackSets: The Deep Story of Deploying IaC to Thousands of Accounts
    • 3.Custom Resource·Hooks·Change Set: CloudFormation's Extension and Validation Mechanisms
    • 4.CDK·CDK Pipelines·Terraform: Deep Comparison of Modern IaC Tools and Self-Evolving Pipelines
    • 5.Week 8 Integrated Scenarios: Where IaC Tools Meet Inside a Single Incident
  • 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 8/Day 5

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

DOP-C02· ProWeek 8 · Day 5~55 min read

Day 5 - Week 8 Integrated Scenarios: Where IaC Tools Meet Inside a Single Incident

Going through Week 8, we looked at seven tools: CloudFormation's Nested/Cross-Stack, Service-managed StackSets, the Custom Resource ResponseURL protocol, Hooks' pre-deployment validation, the CDK's Construct Levels and Pipelines self-mutation, and Terraform tfstate locking. The hard questions on the exam do not feature these tools separately. Three or four of them are tangled together in one scenario, and the question asks "where, and with which tool, should this be solved?" Today we build that integrated sense.

Before solving the questions, let's organize once more. IaC tools are distinguished along three axes: abstraction layer, governance scope, and change timing. Abstraction rises from CFN (YAML) → SAM (macro) → CDK (code); governance expands from a single stack → multiple stacks in a single account → multi-account (StackSets/Pipelines); and change timing has four stages: synthesis time (Aspects/cdk-nag) → before deployment (Hooks) → during deployment (ChangeSet) → after deployment (Drift/Config). Exam scenarios ask where on these three axes the answer lies.

Integrated Comparison Table — All Week 8 Tools

ToolAbstractionGovernanceChange timingOne-line summary
CloudFormationDeclarative YAMLPer stackAt deploymentThe foundation engine, 13 years of accumulated governance assets
SAMCFN macro + serverless DSLStackSynthesis → deploymentCondenses serverless boilerplate
CDKCode (TS/Py/Java)StackSynthesis → deploymentThe LLVM IR pattern, code reusability
CDK PipelinesCodeMulti-environmentSelf-mutating CIThe pipeline is code too, the GitOps principle
StackSetsCFN synchronizationMulti-account, multi-RegionOU-level fan-outThe single source of truth for 1000+ accounts
Custom ResourceLambda ProviderExtension inside a stackInvoked during deploymentExtends CFN as a lifecycle engine
CFN HooksResource Type ProviderStack or OrgPre-blocks changesThe K8s ValidatingAdmissionWebhook pattern
CFN DriftDetection mechanismStack/StackSetPost-deployment comparisonDetection only, no automatic fix
Change SetChange previewStackReview before deploymentReplacement=True is the danger signal
TerraformHCLPer tfstateplan → applyMulti-cloud, self-managed tfstate
CDKTFCode → HCLtfstateSynthesisCDK constructs + Terraform Providers

Keep this table in mind as you look at the scenarios. Each scenario is built to resemble a real operational situation a company has faced, and the options other than the correct answer are partly correct as well, so you must pick "the most appropriate."

📝 Practice Questions

Click a choice to reveal the answer and explanation.

Question 1

A fintech wants to deploy the same GuardDuty/CloudTrail/Config baseline to 200 child accounts in an AWS Organizations environment, and the same baseline must be applied automatically to new accounts added every week. The security team also requires minimizing day-to-day use of the Management Account. What is the most appropriate configuration?

Question 2

A SaaS company deployed an RDS DBInstance change to a prod CloudFormation Stack, and the database was unintentionally replaced, causing 6 hours of downtime. To strengthen the standard change procedure so the same incident does not recur, what is the most appropriate combination?

Question 3

In a CloudFormation environment run by a game company, the network Stack's VpcId Export is used as an ImportValue by 50 other Stacks. When they tried to update the network Stack to expand the VPC, the entire deployment stopped with a "Cannot update Export" error. Which answer satisfies both an immediate fix and long-term improvement?

Question 4

A company wants to codify a newly released AWS Bedrock model in CloudFormation but found that some deep features are not yet supported by CFN. They plan to handle only that part with a Custom Resource Lambda. What is the most important design element for operational stability?

Question 5

A SaaS deploys the same pattern (Lambda + DynamoDB + API Gateway + X-Ray + CloudWatch Alarm) to 200 microservices with the CDK. The security team wants to apply a new policy ("all Lambdas must have reserved concurrency of 100 or less, and all DynamoDB tables must have point-in-time recovery enabled"). How can you enforce it consistently without modifying the code of the 200 services?

Question 6

A game company deploys to three environments, Dev/Staging/Prod, with CDK Pipelines, but after adding the Prod account the build fails with a "KMS access denied" error. The Pipeline is in the Tooling account and Prod is a separate account. What is the most accurate cause and fix?

Question 7

A SaaS introduced CDK Aspects and applied 30 cdk-nag rules to prod all at once, including forcing encryption on all S3 buckets, multi-AZ on all RDS, a dead letter queue on all Lambdas, and WAF association on all ALBs. The build failed with 1200 violations and all deployments stopped. What is an appropriate adoption strategy?

Question 8

A fintech removed 5 child AWS accounts from Organizations because of a subsidiary sale, and the baseline Stacks deployed by StackSets were automatically deleted, so the CloudTrail Trail inside them disappeared and 90 days of audit logs from just before the sale were lost. What is the most accurate combination to prevent recurrence?

Question 9

A company adds a new environment (5 per-customer sandboxes) every week, and each time an operator edits the CodePipeline definition by hand and redeploys the pipeline with CFN. What is the most appropriate tool to automate this?

Question 10

In a 500-account environment, the security team requires evaluating in real time which accounts have GuardDuty disabled and automatically re-enabling it. What is the most appropriate multi-layered configuration?

Question 11

A company injected an RDS password into a prod CloudFormation Stack with '{{resolve:secretsmanager:prod/db:SecretString:password}}'. After the security team rotated the password in Secrets Manager, they found it was not applied to RDS and was reflected only at the next Stack update. To synchronize automatically, what should be done?

Question 12

A company wants to set an IaC operating standard that satisfies all of the following requirements: (1) a human confirmation step on every prod change, (2) blocking unintended RDS replacement, (3) automatic baseline for new member accounts, (4) pre-blocking of security policy violations in prod CFN changes, (5) quickly codifying newly released AWS services, (6) consistently enforcing the common pattern across 200 microservices. What is the most appropriate tool mapping for each requirement?

A Meta-Strategy for Solving Scenarios

Rather than memorizing the answer to each question, approach them with the following flow and any new scenario can be solved.

Step 1: Map keywords to axes

  • "OU-level / multi-account automatic" → StackSets or Control Tower
  • "Pre-block / prevent violations" → Hooks or Aspects/cdk-nag
  • "Change preview / human approval" → Change Set + Manual Approval
  • "Not supported by CFN / external system" → Custom Resource
  • "Long wait / polling" → CDK Provider isComplete
  • "Pipeline updates itself" → CDK Pipelines self-mutation
  • "Replacement / downtime" → Review Replacement=True, protect with UpdateReplacePolicy
  • "tfstate / multi-cloud" → Terraform

Step 2: Judge single tool vs multi-layered defense

  • If keywords like "prevent recurrence," "security team standard," or "PCI/SOC 2" are present, the multi-layered defense is the answer
  • Even if an answer that picks a single tool is attractive, go with the multi-layered one if it is more accurate

Step 3: Check operational realism

  • Answers like "by hand across 200 accounts" or "daily in the console" are traps
  • The answer where operators do not have to touch things every time in practice is correct
  • Prefer tools that automate with a one-time setup

Step 4: Exam trap patterns

  • A single-tool cure-all like "do everything with ~" is almost always a trap
  • Options that put a side effect like "cost reduction" as the main answer are traps
  • "Solve everything with IAM" is almost always a trap in IaC governance

📌 Week 8 Integrated Summary

Today's integrated scenarios are the settlement of all of Week 8's learning. To summarize, there are five principles.

First, choose the abstraction layer appropriately. CFN (low-level) → SAM (serverless macro) → CDK (code) each have their pros and cons, and the higher abstraction is not automatically the answer. For prod security policy, precise control with CDK L1 or direct CFN is recommended, and for repeated standard patterns, concentrating them in your own L3 Construct is the standard.

Second, expand governance scope step by step. Start from a single Stack and expand to multiple Stacks in one account (Cross-Stack/Nested), multi-account (StackSets), multi-account multi-environment (CDK Pipelines), and the Org level (Conformance Pack/Hooks). Adopt in stages to fit the company's size.

Third, multi-layered validation across change timing. All four stages, synthesis time (Aspects/cdk-nag/cfn-lint), pre-deployment (Change Set + Manual Approval, Hooks), and post-deployment (Drift Detection, Config Rules), prevent different incidents. A single layer has bypass paths.

Fourth, multi-layered protection of stateful resources. DeletionPolicy (on Stack deletion), UpdateReplacePolicy (on replacement from property changes), Stack Policy (on entering the Update API), Termination Protection (on DeleteStack API calls), and even separate backups (AWS Backup), a five-layer defense. A single policy can always be bypassed.

Fifth, graceful rollout of governance tools. Phased adoption of Hooks WARN→FAIL, cdk-nag warning→error, Config Rule notify→remediate, and OPA dryrun→warn→deny is the standard. Enforcing all policies at once causes operational paralysis.

🔜 Coming Up in Week 9

Next week we move into the area of configuration management: SSM Parameter Store, AppConfig, Secrets Manager, EC2 Image Builder, Patch Manager. If IaC defined the "shape of the infrastructure," configuration management handles "the values that infrastructure needs to operate." As Week 8's dynamic reference {{resolve:ssm:...}} meets Week 9's Parameter Store operating principles, the same mechanism is revealed in greater depth.


Week 8 complete. From CloudFormation's 13 years of accumulated governance assets to CDK Pipelines self-mutation, we have passed once through the whole realm of modern IaC operations. In your final check before the exam, if you re-solve this article's 12 scenarios again, where you are weak will become clear.

PreviousCDK·CDK Pipelines·Terraform: Deep Comparison of Modern IaC Tools and Self-Evolving PipelinesWeek 8 · Day 4Next Systems Manager: Run Command·Session Manager·Patch Manager's Deep StoryWeek 9 · Day 1

Official references

  • DOP-C02 official exam page(opens in a new tab)
  • AWS Lambda documentation(opens in a new tab)
  • Amazon RDS · Aurora documentation(opens in a new tab)
  • AWS IAM documentation(opens in a new tab)
  • AWS CloudFormation documentation(opens in a new tab)
  • AWS KMS documentation(opens in a new tab)

On this page

  • Integrated Comparison Table — All Week 8 Tools
  • Practice Questions
  • A Meta-Strategy for Solving Scenarios
  • Week 8 Integrated Summary
  • Coming Up in Week 9