Prompt

0 copies · 0 said it worked

Coding· Chat UI

Guide an AI to write reviewable, safe AWS CDK infrastructure code

A set of rules a platform engineer gives an assistant so AWS CDK changes stay typed, staged, tested, and safe to deploy through CI.

People use this for

  • aws cdk infrastructure review
  • typescript cdk stack guidelines
  • cdk pipeline safe deployment rules
  • infrastructure as code aws review
  • write cdk code reviewable
Imported · UnclaimedCC0

Imported on Nov 29, 2026 from AWS CDK Infrastructure taste . License observed at the source on Nov 29, 2026: CC0.

Are you the author?Claim this profileRequest removal

Prompt

# AWS CDK Infrastructure taste of a platform engineer who wants boring, reviewable cloud changes
- Write CDK apps in TypeScript so constructs, props and IDE hints are fully typed. Confidence: 0.85
- Use L2 constructs by default, drop to L1 `Cfn*` resources only for missing features, and wrap them in your own construct. Confidence: 0.85
- Split the app into small stacks by lifecycle: stateful resources like databases and buckets live apart from stateless compute. Confidence: 0.90
- Set `removalPolicy: RETAIN` and deletion protection on every stateful resource in production. Confidence: 0.95
- Never hardcode account IDs or regions; pass them in through an environment config per stage. Confidence: 0.90
- Model environments as stages of the same app, so dev, staging and prod are built from identical code. Confidence: 0.85
- Run `cdk diff` in every pull request and post the output for review before anything deploys. Confidence: 0.90
- Deploy only from CI with CDK Pipelines or a similar pipeline, never with `cdk deploy` from a laptop to production. Confidence: 0.90
- Grant permissions with construct methods like `bucket.grantRead(fn)` instead of writing IAM policy JSON by hand. Confidence: 0.90
- Add `cdk-nag` with the AWS Solutions rules and justify every suppression in code. Confidence: 0.80
- Keep logical IDs stable; renaming a construct ID replaces the resource, so treat it as a migration. Confidence: 0.90
- Store secrets in Secrets Manager or SSM Parameter Store and reference them, never put secret values in context or props. Confidence: 0.95
- Tag every resource with owner, service and cost center through `Tags.of(app)`. Confidence: 0.80
- Write snapshot tests for stacks and fine-grained assertions for security-critical properties. Confidence: 0.75
- Pin the `aws-cdk-lib` version and upgrade it on purpose, reading the changelog for feature flags. Confidence: 0.80
- Avoid cross-stack exports for things that change often; pass values through SSM parameters instead. Confidence: 0.70
- Use `NodejsFunction` or bundled assets so Lambda code is built by the same pipeline as the infrastructure. Confidence: 0.75
- Enable logs, alarms and dashboards in the same construct that creates the resource. Confidence: 0.80
- Keep `cdk.context.json` committed so lookups are deterministic across machines. Confidence: 0.85

No result recorded for this import yet. Tried it? File a report so the next person knows how it went.

Tried it

Structured reports from people who ran this prompt. They roll up into the per-model badges above.

No one has filed a report yet. Try the prompt and be the first.

License: CC0v1 · published Nov 29, 2026

Comments

No comments yet. If you tried this prompt, say how it went.