---
name: "aws-cdk-construct-library"
description: "Synthesize deterministic AWS CloudFormation templates using object-oriented AWS CDK v2."
metadata:
  author: "AWS"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "create aws cdk l3 construct"
  - "run cdk diff"
  - "synthesize cloudformation cdk"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# AWS CDK v2 L3 Construct Development & CloudFormation

Develops AWS CDK v2 apps: authoring custom L3 constructs, defining Stacks and Stages, managing cross-stack references, configuring removal policies (DESTROY vs RETAIN), and running cdk synth / cdk diff.

## When to Invoke
Invoke this skill whenever you need to:
- create aws cdk l3 construct
- run cdk diff
- synthesize cloudformation cdk

## Execution SOP & Rules
1. Initialize CDK project: cdk init app --language=typescript.
2. Inherit from Construct base class: export class SecureBucket extends Construct { ... }.
3. Inspect generated CloudFormation: cdk synth to verify logical IDs and IAM policies.
4. Deploy stack: cdk deploy --require-approval never.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
