Skip to content

Pillar

AWS CDK Patterns That Actually Run in Production

Real CDK stacks behind every article. Cost numbers, failure modes, IAM patterns, and the operational details most tutorials skip.

Most AWS CDK content stops at "the stack deploys." That is the easy part. The real work is the next layer: what the stack costs at 10x scale, what fails first under load, which IAM policy bites you in 6 months, and how the team operates the system once it ships.

This pillar collects the InfraTales walkthroughs that get into that layer. Every article ships with a public CDK repo so you can read the code, not just the description.

Compute and traffic shape

How the request flows, where the latency lives, and which compute primitive is right for which traffic pattern.

  • S3 -> EventBridge -> Lambda for event-driven processing without the cost surprises of polling. See the cost-and-architecture article below.
  • EC2 + CodeDeploy + Auto Scaling Group when you need long-lived workloads with controlled rollout and lifecycle hooks. The article on this covers blue-green deployment without the 2am 502s.
  • Fargate + Aurora + CloudFront when you want containers without managing nodes and need a cleanly bounded relational data layer. The web-app-deployment article wires all three together with VPC isolation and CDN edge caching.

Security and cost trade-offs

Production CDK is more about IAM and KMS decisions than language choice.

  • KMS + IAM + VPC + WAFv2 in one stack — see the security-as-code article. This one is paid because the IAM policy walkthrough is the value most teams pay consultants for.
  • Cost-by-volume tables appear in every cost-tagged article. They're how you know whether your design is fine at MVP and broken at 100M monthly events.

Migration and data movement

CDK shines for one-shot migration pipelines that are run-and-burn.

  • DataSync + DMS + Step Functions for a heterogeneous data move with checkpointing — a paid walkthrough below.

Where to start

If you have 30 minutes and a specific decision: read the article that maps closest to your situation. Each one names the failure mode it prevents in the H1.

If you have a Saturday and want to internalize the patterns: read in this order — S3-EventBridge-Lambda first (smallest blast radius, simplest pattern), then CodeDeploy-ASG (state and rollout), then Fargate-Aurora-CloudFront (composition).

If you're about to make an architecture decision worth >$10k/year and want a second opinion: book a 30-minute architecture review at /consulting/. Free for genuine production decisions.

Cluster posts

Every article in this pillar.

Newsletter

Get the best new deep dives without the feed noise.

Only when there is something worth reading. No fixed schedule, no filler. InfraTales is built for engineers who would rather receive one useful note than five content-marketing reminders.