aws-cdk
Provides AWS CDK TypeScript patterns for defining, validating, and deploying AWS infrastructure as code. Use when creating CDK apps, stacks, and reusable constructs, modeling serverless or VPC-based architectures, applying IAM and encryption defaults, or testing and reviewing `cdk synth`, `cdk diff`, and `cdk deploy` changes. Triggers include "aws cdk typescript", "create cdk app", "cdk stack", "cdk construct", "cdk deploy", and "cdk test".
Security Assessment
About aws-cdk
This skill provides AWS CDK patterns for defining, validating, and deploying AWS infrastructure as code using TypeScript. It addresses the common problem of writing infrastructure that is repeatable, safe by default, and verifiable before it reaches a live AWS account, by codifying reusable constructs, sensible security defaults, and a validation-first delivery loop rather than ad-hoc CloudFormation authoring.
The skill walks through project initialization with `npx cdk init`, a core architecture example that instantiates stacks in an app entry point, and guidance on choosing between L1 (raw CloudFormation), L2 (curated with defaults and grant helpers), and L3 (multi-resource patterns like LambdaRestApi) constructs. It documents the CDK lifecycle commands (`cdk synth`, `cdk diff`, `cdk deploy`, `cdk destroy`, `cdk ls`, `cdk doctor`) and a recommended delivery loop: model the stack, run synth, run infrastructure tests, then review a diff for IAM broadening, resource replacement, and deletes on stateful resources before deploying. Bundled reference files cover core concepts, security hardening, testing strategies, VPC networking, and serverless patterns. Examples apply safe defaults such as S3 bucket encryption, versioning, blocked public access, and RETAIN removal policies.
It targets TypeScript developers, DevOps and platform engineers, and cloud architects building serverless or VPC-based AWS architectures who want environment-aware, multi-stack deployments with least-privilege IAM. Typical use cases include scaffolding a new CDK app, extracting repeated logic into custom constructs, and reviewing infrastructure changes before deploying to development or production accounts.
FAQ
What language and framework does this skill target?
It targets AWS CDK using TypeScript, including CDK apps, stacks, and reusable constructs. Examples use aws-cdk-lib and the constructs library.
Do I need an AWS account to use it?
Yes for actual deployment. Commands like cdk deploy create or update CloudFormation stacks in a target AWS account and region, which you configure via environment (CDK_DEFAULT_ACCOUNT/REGION) or explicit env props. Synthesis and testing can be run without deploying.
How does it help avoid risky infrastructure changes?
It prescribes a validation-first loop: run cdk synth, run infrastructure tests covering IAM scope and stateful resources, then review cdk diff for IAM broadening, resource replacement, export changes, and deletes on stateful resources before deploying.
Which construct level should I use?
The skill recommends L2 constructs for standard resource provisioning because they provide sensible defaults and grant helpers, L1 when you need properties not exposed by L2, and L3 patterns for common multi-resource architectures.
Install aws-cdk
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
giuseppe-trisciuoglio/developer-kit