aws-cloudformation
Skill274 starsChanged 28 days agoMITView on GitHub
AWS CloudFormation infrastructure as code for stack management. Use when writing templates, deploying stacks, managing drift, troubleshooting deployments, or organizing infrastructure with nested stacks.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- delorenj/skillstheir own version, first seen Nov 7, 2026
- thiago-shopper/claude-skillstheir own version, first seen Nov 1, 2026
- opensite-ai/opensite-skillstheir own version, first seen Nov 1, 2026
- aws/agent-toolkit-for-awstheir own version, first seen Oct 13, 2026
- richardnroman/Synthetic-Data-Exchange-Licensing-Platformtheir own version, first seen Jul 26, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- aws/agent-toolkit-for-aws★ 3.4ksame name
- delorenj/skills★ 17same name
- opensite-ai/opensite-skills★ 15same name
- richardnroman/Synthetic-Data-Exchange-Licensing-Platform★ 0same name
- thiago-shopper/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository53 other files it gives its agents.
- website/docs/authoring/agents.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- .github/skills/git-ape-onboarding/templates/copilot-instructions.mdCopilot instructions
- aws-api-gatewaySkill
- aws-bedrockSkill
- aws-cloudwatchSkill
- aws-cognitoSkill
- aws-cost-estimatorSkill
- aws-dynamodbSkill
- aws-ec2Skill
- aws-ecsSkill
- aws-eksSkill
- aws-eventbridgeSkill
- aws-iamSkill
- aws-lambdaSkill
- aws-naming-researchSkill
- aws-rdsSkill
- aws-s3Skill
- aws-secrets-managerSkill
- aws-security-analyzerSkill
- aws-snsSkill
- aws-sqsSkill
- aws-step-functionsSkill
- csd-assessment-reportSkill
- deployment-blueprintsSkill
- fulfillment-and-meteringSkill
- isv-landing-zone-foundationSkill
- marketplace-offer-typesSkill
- marketplace-onboardingSkill
- multi-tenant-saasSkill
- onboard-to-marketplaceSkill
- saas-accelerator-bootstrapSkill
- saas-assessment-reportSkill
- scale-and-sreSkill
- security-and-complianceSkill
- tenant-isolation-modelsSkill
- tenant-lifecycle-automationSkill
- azure-cost-estimatorSkill
- azure-deployment-preflightSkill
- azure-drift-detectorSkill
- azure-integration-testerSkill
- azure-naming-researchSkill
- azure-policy-advisorSkill
- azure-resource-availabilitySkill
- azure-resource-visualizerSkill
- azure-rest-api-referenceSkill
- azure-role-selectorSkill
- azure-security-analyzerSkill
- azure-stack-deploySkill
- azure-stack-destroySkill
- git-ape-onboardingSkill
- git-ape-skillsSkill
- prereq-checkSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 283
Use IAM roles: instead of access keys
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AWS CloudFormation
AWS CloudFormation provisions and manages AWS resources using templates. Define infrastructure as code, version control it, and deploy consistently across environments.
Table of Contents
- Core Concepts
- Common Patterns
- CLI Reference
- Best Practices
- Troubleshooting
- References
Core Concepts
Templates
JSON or YAML files defining AWS resources. Key sections:
- Parameters: Input values
- Mappings: Static lookup tables
- Conditions: Conditional resource creation
- Resources: AWS resources (required)
- Outputs: Return values
Stacks
Collection of resources managed as a single unit. Created from templates.
Change Sets
Preview changes before executing updates.
Stack Sets
Deploy stacks across multiple accounts and regions.
Common Patterns
Basic Template Structure
AWSTemplateFormatVersion: '2010-09-09'
Description: My infrastructure template
Parameters:
Environment:
Type: String
AllowedValues: [dev, staging, prod]
Default: dev
Mappings:
EnvironmentConfig:
dev:
InstanceType: t3.micro
prod:
InstanceType: t3.large
Conditions:
IsProd: !Equals [!Ref Environment, prod]
Resources:
MyBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: !Sub 'my-app-${Environment}-${AWS::AccountId}'
VersioningConfiguration:
Status: !If [IsProd, Enabled, Suspended]
Outputs:
BucketName:
Description: S3 bucket name
Value: !Ref MyBucket
Export:
Name: !Sub '${AWS::StackName}-BucketName'Deploy a Stack
AWS CLI:
# Create stack
aws cloudformation create-stack \
--stack-name my-stack \
--template-body file://template.yaml \
--parameters ParameterKey=Environment,ParameterValue=prod \
--capabilities CAPABILITY_IAM
# Wait for completion
aws cloudformation wait stack-create-complete --stack-name my-stack
# Update stack
aws cloudformation update-stack \
--stack-name my-stack \
--template-body file://template.yaml \
--parameters ParameterKey=Environment,ParameterValue=prod
# Delete stack
aws cloudformation delete-stack --stack-name my-stackUse Change Sets
# Create change set
aws cloudformation create-change-set \
--stack-name my-stack \
--change-set-name my-changes \
--template-body file://template.yaml \
--parameters ParameterKey=Environment,ParameterValue=prod
# Describe changes
aws cloudformation describe-change-set \
--stack-name my-stack \
--change-set-name my-changes
# Execute change set
aws cloudformation execute-change-set \
--stack-name my-stack \
--change-set-name my-changesLambda Function in CloudFormation
Resources:
LambdaFunction:
Type: AWS::Lambda::Function
Properties:
FunctionName: !Sub '${AWS::StackName}-function'
Runtime: python3.12
Handler: index.handler
Role: !GetAtt LambdaRole.Arn
Code:
ZipFile: |
def handler(event, context):
return {'statusCode': 200, 'body': 'Hello'}
Environment:
Variables:
ENVIRONMENT: !Ref Environment
LambdaRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
Service: lambda.amazonaws.com
Action: sts:AssumeRole
ManagedPolicyArns:
- arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRoleVPC with Subnets
Resources:
VPC:
Type: AWS::EC2::VPC
Properties:
CidrBlock: 10.0.0.0/16
EnableDnsHostnames: true
Tags:
- Key: Name
Value: !Sub '${AWS::StackName}-vpc'
PublicSubnet1:
Type: AWS::EC2::Subnet
Properties:
VpcId: !Ref VPC
AvailabilityZone: !Select [0, !GetAZs '']
CidrBlock: 10.0.1.0/24
MapPublicIpOnLaunch: true
PrivateSubnet1:
Type: AWS::EC2::Subnet
Properties:
VpcId: !Ref VPC
AvailabilityZone: !Select [0, !GetAZs '']
CidrBlock: 10.0.10.0/24
InternetGateway:
Type: AWS::EC2::InternetGateway
AttachGateway:
Type: AWS::EC2::VPCGatewayAttachment
Properties:
VpcId: !Ref VPC
InternetGatewayId: !Ref InternetGateway
PublicRouteTable:
Type: AWS::EC2::RouteTable
Properties:
VpcId: !Ref VPC
PublicRoute:
Type: AWS::EC2::Route
DependsOn: AttachGateway
Properties:
RouteTableId: !Ref PublicRouteTable
DestinationCidrBlock: 0.0.0.0/0
GatewayId: !Ref InternetGatewayDynamoDB Table
Resources:
OrdersTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: !Sub '${AWS::StackName}-orders'
AttributeDefinitions:
- AttributeName: PK
AttributeType: S
- AttributeName: SK
AttributeType: S
KeySchema:
- AttributeName: PK
KeyType: HASH
- AttributeName: SK
KeyType: RANGE
BillingMode: PAY_PER_REQUEST
PointInTimeRecoverySpecification:
PointInTimeRecoveryEnabled: trueCLI Reference
Stack Operations
| Command | Description |
aws cloudformation create-stack | Create stack |
aws cloudformation update-stack | Update stack |
aws cloudformation delete-stack | Delete stack |
aws cloudformation describe-stacks | Get stack info |
aws cloudformation list-stacks | List stacks |
aws cloudformation describe-stack-events | Get events |
aws cloudformation describe-stack-resources | Get resources |
Change Sets
| Command | Description |
aws cloudformation create-change-set | Create change set |
aws cloudformation describe-change-set | View changes |
aws cloudformation execute-change-set | Apply changes |
aws cloudformation delete-change-set | Delete change set |
Template
| Command | Description |
aws cloudformation validate-template | Validate template |
aws cloudformation get-template | Get stack template |
aws cloudformation get-template-summary | Get template info |
Best Practices
Template Design
- Use parameters for environment-specific values
- Use mappings for static lookup tables
- Use conditions for optional resources
- Export outputs for cross-stack references
- Add descriptions to parameters and outputs
Security
- Use IAM roles instead of access keys
- Enable termination protection for production
- Use stack policies to protect resources
- Never hardcode secrets — use Secrets Manager
# Enable termination protection
aws cloudformation update-termination-protection \
--stack-name my-stack \
--enable-termination-protectionOrganization
- Use nested stacks for complex infrastructure
- Create reusable modules
- Version control templates
- Use consistent naming conventions
Reliability
- Use DependsOn for explicit dependencies
- Configure creation policies for instances
- Use update policies for Auto Scaling groups
- Implement rollback triggers
Troubleshooting
Stack Creation Failed
# Get failure reason
aws cloudformation describe-stack-events \
--stack-name my-stack \
--query 'StackEvents[?ResourceStatus==`CREATE_FAILED`]'
# Common causes:
# - IAM permissions
# - Resource limits
# - Invalid property values
# - Dependency failuresStack Stuck in DELETE_FAILED
# Identify resources that couldn't be deleted
aws cloudformation describe-stack-resources \
--stack-name my-stack \
--query 'StackResources[?ResourceStatus==`DELETE_FAILED`]'
# Retry with resources to skip
aws cloudformation delete-stack \
--stack-name my-stack \
--retain-resources ResourceLogicalId1 ResourceLogicalId2Drift Detection
# Detect drift
aws cloudformation detect-stack-drift --stack-name my-stack
# Check drift status
aws cloudformation describe-stack-drift-detection-status \
--stack-drift-detection-id abc123
# View drifted resources
aws cloudformation describe-stack-resource-drifts \
--stack-name my-stackRollback Failed
# Continue update rollback
aws cloudformation continue-update-rollback \
--stack-name my-stack \
--resources-to-skip ResourceLogicalId1References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

