
Description
Scaffold new AWS infrastructure-as-code projects using CDK, Terraform, SAM, or CloudFormation. Use when creating new IaC projects, adding new stacks/modules, or setting up deployment pipelines for AWS infrastructure.
SKILL.md
Scaffold a new AWS IaC project.
Framework: $ARGUMENTS0 (cdk, terraform, sam, or cfn) Description: $ARGUMENTS1
Process
- Ask clarifying questions if the framework or description is unclear
- Use the
aws-iacMCP tools to validate resource configurations and check for security issues - Use the
awsknowledgeMCP tools (mcp__plugin_aws-dev-toolkit_awsknowledge__aws___search_documentation,mcp__plugin_aws-dev-toolkit_awsknowledge__aws___read_documentation,mcp__plugin_aws-dev-toolkit_awsknowledge__aws___recommend) to look up current best practices for the chosen framework - Generate the project structure following the patterns in templates/
Framework-Specific Guidance
CDK (TypeScript default)
- Use
cdk init app --language typescriptpatterns - Separate stacks by lifecycle (networking, data, compute)
- Use
cdk-nagfor compliance checks - Outputs for cross-stack references
Terraform
- Module-per-service structure
- Remote state in S3 + DynamoDB locking
- Use
terraform-aws-moduleswhere they exist - Separate tfvars per environment
SAM
- template.yaml at root
- Globals section for shared Lambda config
- Use SAM Accelerate for fast iteration
CloudFormation
- Nested stacks for reuse
- Parameters with AllowedValues for guardrails
- Conditions for multi-environment templates
Gotchas
- Always include a
.gitignoreappropriate for the framework - CDK: don't put secrets in context — use SSM Parameter Store or Secrets Manager
- Terraform: never commit
.tfstate— configure remote backend first - SAM:
sam localneeds Docker — mention this in the README - All frameworks: tag everything with at minimum
Environment,Project,Owner - Include a Makefile or justfile with common commands (deploy, destroy, diff, synth)
Output
Generate the complete project structure with:
- Entry point / main config file
- At least one example resource
- Environment-specific configuration
- README with setup instructions
- CI/CD pipeline config (GitHub Actions default, ask if different)
More skills from the startups repository
View all 42 skillsagentcore
design Amazon Bedrock AgentCore architectures
Jul 12AgentsArchitectureAWSaidlc-lite
develop AI applications on AWS
Jul 12AgentsAI InfrastructureAWSEngineeringarchitect-for-startups
advise on AWS architecture for startups
Jul 12ArchitectureAWSStrategyaws-architect
design and review AWS architectures
Jul 12ArchitectureAWSInfrastructureaws-compare
compare AWS architecture options
Jul 12ArchitectureAWSCost OptimizationSecurityaws-debug
debug AWS infrastructure and deployment failures
Jul 12AWSDebuggingDeploymentObservability
More from AWS Labs
View publisheragentcore-investigation
investigate Bedrock AgentCore runtime sessions
mcp
Jul 12AWSDebuggingLogsObservabilityamazon aurora dsql
build applications with Aurora DSQL
mcp
Jul 12AuroraAWSDatabaseServerless +1aurora dsql
build applications with Aurora DSQL
mcp
Jul 12AWSDatabaseServerlessSQLaws dsql
build applications with Aurora DSQL
mcp
Jul 12AWSDatabaseMigrationServerless +1distributed postgres
build applications with Aurora DSQL
mcp
Jul 12AWSDatabasePostgreSQLServerless +1distributed sql
build applications with Aurora DSQL
mcp
Jul 12AWSDatabaseServerlessSQL