Loading...
Loading...
Authors, deploys, and troubleshoots AWS infrastructure using CDK with TypeScript or Python. Covers best practices, stack architecture, and construct patterns. Always use when writing CDK constructs, bootstrapping environments, running cdk deploy/synth/diff, fixing CDK or CloudFormation errors, planning stack structure, importing existing resources, resolving drift, or refactoring stacks without resource replacement.
npx skill4agent add aws/agent-toolkit-for-aws aws-cdkthis.exportValue()exportValue()cdk diffcdk rollback $STACKcdk rollback $STACK --orphan <LogicalId>removalPolicy: DESTROYautoDeleteObjects: true| Task | Quick Command | Details |
|---|---|---|
| Bootstrap | | bootstrap-and-project-setup |
| New TS project | | bootstrap-and-project-setup |
| New Python project | | bootstrap-and-project-setup |
| Deploy | | Always diff before deploy to prod |
| cdk-nag | | compliance-and-drift |
| Drift | | compliance-and-drift |
| Import resource | | import-and-migrate |
| Refactor safely | | refactor-and-prevent-replacement |
| Error | Cause → Fix |
|---|---|
| DeployFailed / DeploymentError | CDK error is not root cause. Check CFN events: |
| NoCredentials / ExpiredToken / AssumeRoleFailed | |
| Asset errors (CannotFindAsset, FailedToBundleAsset, AssetBuildFailed, AssetPublishFailed) | Path wrong, Docker not running, or bootstrap bucket perms. Use |
| AppRequired | Add |
| AnnotationErrors | Fix the underlying issue; suppress with |
| ConcurrentReadLock / ConcurrentWriteLock | |
| BootstrapVersionValidation | Re-bootstrap. Match |
| DependencyCycle | Extract shared resource into third stack or use SSM for late-binding. Details |
| UnresolvedAccount | Set explicit |
| NoStacksMatched | CDK uses logical ID (2nd constructor arg), not CFN name. |
| Cannot find module (synth time) | Run |
| V1 import paths / duplicate aws-cdk-lib | V1 |
| Lambda Cannot find module (runtime) | Wrong handler value, missing SDK v3 migration, Python deps not bundled. Details |
| API Gateway multi-stage conflicts | Set |
node.defaultChildaddPropertyOverride--custom-permissions-boundarygrant*()cdk-nag--strictterminationProtection: truecdk.context.json