Enterprise-grade AWS CDK scaffold with cdk-nag compliance, multi-environment support, and AI-assisted development via ThothForge.
bin/ CDK app entry point
lib/
├── stacks/
│ ├── foundation/ Core resources (S3, KMS, IAM baselines)
│ ├── platform/ Shared infra (VPC, ECS, API Gateway)
│ └── application/ Workload resources (Lambda, DynamoDB)
└── constructs/ Reusable L2/L3 constructs
app/functions/ Lambda function source code
project_configs/ YAML-driven environment configuration
test/ CDK assertions + cdk-nag + snapshots
docs/catalog/ Backstage TechDocs
# Install dependencies
npm install
# Synthesize CloudFormation (dev environment)
npx cdk synth --context env=dev
# Run tests (includes cdk-nag compliance)
npm test
# Deploy to dev
npx cdk deploy --all --context env=devEdit project_configs/environment_options.yaml to configure accounts and regions:
environments:
dev:
account: "111111111111"
region: "us-east-1"
prd:
account: "333333333333"
region: "us-east-1"- cdk-nag: AwsSolutions checks run on every
cdk synth - Encryption: All storage resources encrypted at rest (S3, EBS, RDS)
- SSL/TLS: Enforced on all data-in-transit paths
- Public access: Blocked by default on all S3 buckets
- Tagging: Mandatory tags (Project, Environment, Owner, ManagedBy)
# Lint
npm run lint
# Format
npm run format
# Watch mode (auto-compile)
npm run watch
# Run specific test
npx jest test/cdk-nag.test.tsGitHub Actions pipeline (.github/workflows/deploy.yml):
- Lint & Test — ESLint, Prettier, Jest
- Synth — CDK synth per environment (matrix)
- Security Scan — Checkov on synthesized CloudFormation
- Deploy — CDK deploy to dev (on main push, with OIDC role)
This scaffold includes a pre-configured THOTH agent (.kiro/agents/thoth.json) with:
- AWS IaC MCP server for CDK best practices
- AWS Knowledge MCP for documentation
- ThothCTL MCP for governance and scanning
- Git MCP for version control
kiro-cli chat --agent thoth| Layer | Purpose | Status |
|---|---|---|
| Foundation | Core resources (S3, KMS, IAM) | ✅ Implemented |
| Platform | Shared infra (VPC, ECS, ALB) | 📋 Placeholder |
| Application | Workload resources (Lambda, DDB) | 📋 Placeholder |
Apache-2.0