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
    • 1.AWS SAM: CloudFormation's Apology to Serverless
    • 2.Serverless Framework and CDK: People Who Chose a Path Other Than SAM
    • 3.Lambda Versions and Aliases: A Mutable Pointer on Top of Immutable Snapshots
    • 4.Step Functions: Workflows as State Machines, Not Code
    • 5.Week 7 Review: All the Pieces of Serverless CI/CD in One Picture
  • 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 7/Day 5

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

DOP-C02· ProWeek 7 · Day 5~45 min read

Day 5 - Week 7 Review: All the Pieces of Serverless CI/CD in One Picture

If we sum up this week in one sentence, it is: "CI/CD for serverless workloads has to be viewed as a single package, from choosing the IaC tool to the deployment strategy to workflow orchestration." SAM (Day 1), Serverless Framework and CDK (Day 2), Lambda Versions, Aliases, and CodeDeploy Canary (Day 3), and Step Functions (Day 4) are all different faces of the same picture. Scenario questions on the exam almost always combine two or three tools, so the ability to match precisely where each tool shines and where it is weak is what decides whether you pass.

Today we reorganize the five core axes of this week and run a comprehensive check with 12 scenario questions that resemble real exam patterns. The goal goes beyond memorizing plain facts: it is to memorize the mapping of "which keyword in this scenario calls which answer."

Summary of the Five Axes

Axis 1: Choosing an IaC Tool - Decided by Workload Nature and Team Language

Scenario keywordSuitable toolReason
"Only Lambda + API Gateway + DynamoDB, YAML"SAMCFN Macro optimizes 6 serverless resource types, low learning curve
"200 Lambda functions, multi-stage, rich plugins"Serverless FrameworkNode plugin ecosystem (but review the v4 license)
"Lambda + EKS + RDS + OpenSearch + TS team"CDKL2 abstractions for all AWS resources + grant methods + in-house L3 libraries
"Multi-cloud (AWS+GCP+Azure)"TerraformCloud-agnostic through the Provider model
"Keep CFN governance (StackSets, Drift) as is + simplify serverless"SAMCompatible with every CFN feature
"9,000 in-house stacks + need a standard pattern library"CDKReusable abstractions through L3 Constructs

Axis 2: Lambda Deployment - The Version/Alias Model

Core proposition: a Version is an immutable snapshot, an Alias is a mutable pointer. Same idea as Git commit/branch, Docker image digest/tag.

publish-version  →  V7 (immutable, never changes)
update-alias --function-version 7  →  live points to V7
FeatureBehavior
$LATESTMutable working copy, no weighted routing, no PC
Version numberImmutable; only resource policy and PC can be changed
Alias weightedprimary + 1 additional only (max 2-way)
API Gateway integration${stageVariables.alias} + add-permission --qualifier <alias>
CodeDeploy CanaryAutoPublishAlias + DeploymentPreference in one line

Axis 3: Cold Start Mitigation - Telling PC and SnapStart Apart Precisely

TechniqueApplicable runtimesCostEffect
Provisioned ConcurrencyAll runtimesBilled for active timeZero cold start (within PC capacity)
SnapStartJava 11/17/21, Python 3.12+, .NET 8+ (zip only)Free for Java, paid for Py/.NETInit time reduced by 90%
Reserved ConcurrencyAllFreeConcurrency limit (unrelated to cold start)
ARM architectureCompatible runtimes20% cheaperInit 10-20% faster

Axis 4: Step Functions - Standard vs Express

ItemStandardExpress
Duration1 year5 minutes
GuaranteeExactly-onceAt-least-once
Synchronous invocationNot possiblePossible (StartSyncExecution)
TaskToken✅❌
PricingPer state transitionPer invocation + execution time
UseDeployment workflows, human approvalAPI backends, IoT, ETL

Axis 5: Integrated Flow - In One Picture

   ┌─ Source (Git) ──→ CodePipeline ──→ CodeBuild (sam build) ──→ CFN Deploy ──┐
   │                                                                                                         ↓
   │                                                                                Publish new Lambda Version V7
   │                                                                                                         ↓
   │                                                              CodeDeploy: Alias 'live' weighted (V6:90, V7:10)
   │                                                                                                         ↓
   │                                                              Wait 5 min + monitor CloudWatch Alarm
   │                                                                                                         ↓
   │                                                                            ┌─ Alarm OK → V7:100
   │                                                                            └─ Alarm → V6:100 (rollback)
   │
   └─ Complex flows → delegate to Step Functions
      ├─ AWS SDK Service Integration (call directly without Lambda)
      ├─ TaskToken (human approval, external systems)
      └─ Distributed Map (large-scale parallelism)

Easily Confused Comparison Table

ABDistinguishing keyword
SAMCDKYAML serverless-specialized vs general-purpose code, all of AWS
SAMServerless FrameworkAWS-native, OSS vs multi-cloud, v4 commercial
Standard SFnExpress SFn1 year, exactly-once vs 5 minutes, at-least-once
Provisioned ConcurrencyReserved ConcurrencyWarm-up, paid vs limit, free
Lambda zipContainer Image250MB, Layers possible vs 10GB, no Layers, no SnapStart
$LATESTVersion numberMutable, no PC vs immutable, PC possible
Alias weightedVersion 100%Canary in two stages vs All-at-once
Inline MapDistributed Map40 concurrent, affects parent history vs 10K concurrent, child executions
.sync integration.waitForTaskTokenWaits for automatic completion vs waits for external callback
sam deploysam syncStandard CFN path vs development speed-up, drift risk

Every comparison in this table is a classic trade-off model. System design principles such as the CAP theorem (Eric Brewer, 2000), PACELC (Daniel Abadi, 2010), and Conway's law (1968) apply equally to IaC and workflow tools. For example, Standard SFn's exactly-once is a consistency guarantee that gives up some availability/performance, while Express's at-least-once is the opposite trade. Exam scenarios almost always ask "which trade-off matters more."

🎯 Scenario: A question may appear on the exam that combines this week's five tools into the following picture: "Synthesize Lambda+DynamoDB+API Gateway with CDK → CodePipeline Source/Build → deploy with SAM Canary → 30 minutes of monitoring → sequential multi-Region deployment with human approval through Step Functions." Questions may ask which service is responsible at each step of this flow.

A case presented at AWS Summit Seoul in 2023 by a fintech company: it ran 1,500 Lambdas with a mix of CDK and SAM. Simple serverless (API + Lambda + Dynamo) used SAM, complex infrastructure (Lambda + EKS + OpenSearch + Step Functions) used CDK, and the deployment workflow was separated out into CodePipeline + Step Functions. By matching the strength of each tool precisely, deployment time dropped by 70%. On the exam, the answer to "how do you combine several tools?" is "separate them according to each tool's strengths" - trying to do everything with one tool is an anti-pattern.

Key Pitfalls Summary

⚠️ Pitfall 1: Forgetting add-permission --qualifier causes a 403 when API Gateway invokes an Alias. A Function ARN permission only allows $LATEST.

⚠️ Pitfall 2: With SnapStart, every invocation generates the same UUID/random value. You must reinitialize in the afterRestore hook of org.crac.Resource.

Pitfall 3: SAM Policy Templates are broad (including GSI/LSI). For PCI/HIPAA, write the Statement directly to restrict to exact ARNs.

Pitfall 4: sam sync --watch bypasses CFN, so drift occurs. In production, the next regular deploy overwrites the changes.

Pitfall 5: PC cannot be set on $LATEST, only on an Alias/Version. During a Canary both Versions have PC, so cost temporarily doubles.

Pitfall 6: Container Image Lambda cannot use Layers or SnapStart. Include all dependencies in the Dockerfile.

Pitfall 7: Alias weighted routing supports only primary + 1 additional. For 3-way you need an ALB target group or Route 53 weighted records.

Pitfall 8: Step Functions Express does not support TaskToken. A human-approval workflow must use Standard.

📝 Practice Questions

Click a choice to reveal the answer and explanation.

Question 1

A SaaS team runs 200 Lambda functions with Serverless Framework v3, and the annual cost of the v4 commercial license is a burden. What is the most reasonable migration path?

Question 2

You want to bring the P99 latency of a Java Spring Boot Lambda (1GB memory, 80MB package, 8-second init) under 1 second, while also minimizing cost. What is the most effective combination?

Question 3

You must transform and aggregate 50 million JSON objects (average 50KB) in an S3 data lake every day. A 1% failure rate is tolerable, and operational burden must be minimal. What is the most suitable pattern?

Question 4

An API Gateway REST API points to the Lambda Alias live, but every code change triggers an API redeployment, making operations cumbersome. What is the cleanest configuration?

Question 5

A team passed all integration tests with sam local invoke and then deployed to production. Lambda was throttled immediately and API Gateway returned 5xx after a 30-second timeout. What is the most likely cause?

Question 6

You must include an ML model (2.5GB) in a Lambda zip package. It exceeds the zip limit. What is the most suitable packaging method?

Question 7

In a CodePipeline sequential deployment us-east-1 → eu-west-1 → ap-northeast-2, if an alarm fires at the EUW1 stage, USE1 and EUW1 must be rolled back in reverse order. What is the most suitable configuration?

Question 8

For a production deployment there is a 3-stage approval: security team → DevOps team → automatic deployment. If there is no response within 7 days at each stage it is automatically canceled, and notification is through a Slack interactive message. What is the most suitable workflow engine and pattern?

Question 9

A team is using sam sync --watch in the production environment. A few days later the next regular sam deploy overwrote all the hotswap changes. What is the most accurate explanation of the cause?

Question 10

A company manages 1,500 Lambda functions with CDK. Each team keeps writing similar function patterns (Lambda + DynamoDB + API Gateway + IAM grant + X-Ray + Powertools) over and over. How do you ensure operational standardization and reusability?

Question 11

A team runs production with CDK Pipelines and selfMutation: true enabled. One day they pushed a wrong pipeline definition and deployed a pipeline that broke self-mutation. The next execution started with the broken pipeline and cannot recover normally. What is the most appropriate prevention and recovery strategy?

Question 12

A payment company designs its payment-processing workflow as follows: validation (50ms) → authentication (100ms) → charge (150ms) → recording (50ms). A synchronous response through API Gateway is required, at 500 calls per second. What is the most suitable workflow engine and invocation pattern?

📌 Week 7 Summary

Finally, let's recap the core of the five axes you learned this week.

  1. IaC tool choice is decided by workload nature and team language. SAM for AWS-only serverless, CDK for diverse AWS resources, Terraform for multi-cloud. For Serverless Framework, reviewing the v4 license is mandatory.

  2. A Lambda Version is an immutable snapshot, an Alias is a mutable pointer. Same idea as Git commit/branch. Weighted routing is possible only with primary + 1 additional - the structural reason CodeDeploy Canary works "one step at a time."

  3. The two standards of cold start mitigation - Provisioned Concurrency (warm-up, paid) vs SnapStart (Java/Python/.NET zip only, init time reduced by 90%). Reserved Concurrency is a limit setting and unrelated to cold start.

  4. Step Functions: choose Standard/Express by invocation frequency x execution time. AWS SDK Service Integration calls 200+ services without Lambda. TaskToken integrates humans and external systems. Distributed Map runs 10K concurrent child workflows.

  5. The integrated flow is the combination of CodePipeline + CodeBuild + CFN/SAM Deploy + CodeDeploy Canary + Step Functions. Separating them according to each service's strengths is the standard pattern. Trying to do everything with one tool is an anti-pattern.


🔜 Next Week Preview (Week 8)

Advanced IaC - Going Deep on CloudFormation/CDK/Terraform

  • Day 1: Advanced CloudFormation - Nested Stack, Cross-Stack, writing your own Macro
  • Day 2: StackSets - multi-account/Region governance
  • Day 3: Internals of Drift Detection, Change Set, and Custom Resource
  • Day 4: Advanced CDK Pipelines + CDK ↔ Terraform integration + cdktf
  • Day 5: 12 comprehensive scenario questions

If this week's theme was "which tool to use," next week's is "how to operate that tool in depth." Applying policies to 100 accounts at once with StackSets, catching manual changes with Drift Detection, and integrating resources CFN doesn't know about with Custom Resources - the real territory of enterprise IaC unfolds.


PreviousStep Functions: Workflows as State Machines, Not CodeWeek 7 · Day 4Next CloudFormation Advanced: Nested·Cross-Stack and the Deep Story of ModularizationWeek 8 · Day 1

Official references

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

On this page

  • Summary of the Five Axes
  • Axis 1: Choosing an IaC Tool - Decided by Workload Nature and Team Language
  • Axis 2: Lambda Deployment - The Version/Alias Model
  • Axis 3: Cold Start Mitigation - Telling PC and SnapStart Apart Precisely
  • Axis 4: Step Functions - Standard vs Express
  • Axis 5: Integrated Flow - In One Picture
  • Easily Confused Comparison Table
  • Key Pitfalls Summary
  • 12 Comprehensive Scenario Questions
  • Scenario 1
  • Scenario 2
  • Scenario 3
  • Scenario 4
  • Scenario 5
  • Scenario 6
  • Scenario 7
  • Scenario 8
  • Scenario 9
  • Scenario 10
  • Scenario 11
  • Scenario 12
  • Week 7 Summary
  • Next Week Preview (Week 8)