Official AWS CDK CLI for initializing CDK apps, synthesizing templates, diffing changes, bootstrapping environments, and deploying AWS stacks.
$npm install -g aws-cdk
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis
AWS CDK CLI is AWS's command line toolkit for running CDK apps through their infrastructure lifecycle. It initializes projects, synthesizes CloudFormation, diffs planned changes, bootstraps environments, deploys or destroys stacks, and supports faster development loops with watch and hotswap.
What It Enables
- Initialize CDK apps, list stacks, inspect context, and synthesize CloudFormation templates or full cloud assemblies from code.
- Bootstrap target accounts, diff planned changes, deploy, rollback, destroy, import, migrate, or drift-check stacks from the shell.
- Run faster development loops with
watchandhotswap, and hand off stack outputs via JSON files for follow-up automation.
Agent Fit
- Commands are explicit and scriptable once
--app, credentials, and target stacks are known, with flags like--yes,--require-approval,--outputs-file, and--progressfor CI-style runs. - Real structured output exists, but it is uneven:
--jsonmainly covers printed templates and inspect commands, while deploy and diff still produce mostly human-oriented progress and reports. - Fits best as the action layer on top of a project-specific skill that knows app entrypoints, stack selectors, AWS accounts, and when development-only hotswap behavior is acceptable.
Caveats
- Useful operation depends on an existing CDK app or cloud assembly plus configured AWS credentials and bootstrapped target environments.
watch,hotswap, andhotswap-fallbackintentionally bypass normal CloudFormation deployment behavior and are for development, not production.