home / cloud / cdk

AWS CDK CLI

Official · AWS
13k

Official AWS CDK CLI for initializing CDK apps, synthesizing templates, diffing changes, bootstrapping environments, and deploying AWS stacks.

$npm install -g aws-cdk
Language
TypeScript
Stars
12,688
Category
Cloud & Storage
Agent
Ready
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 watch and hotswap, 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 --progress for CI-style runs.
  • Real structured output exists, but it is uneven: --json mainly 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, and hotswap-fallback intentionally bypass normal CloudFormation deployment behavior and are for development, not production.