A collection of useful CloudFormation templates
Python
5,222
684 commits
updated Oct 3, 2026
This repository contains sample CloudFormation templates that you can use to help you get started on new infrastructure projects. Keep in mind that these templates are not meant to be production-ready "QuickStarts". You should take the time to learn how they work, adapt them to your needs, and make sure that they meet your company's compliance standards.
Each template in this repository passes CloudFormation Linter (cfn-lint) checks, and also a basic set of CloudFormation Guard rules based on the CIS Top 20, with exceptions for some rules where it made sense to keep the sample focused on a single use case.
Join us on Discord to discuss rain and all things CloudFormation! Connect and interact with CloudFormation developers and experts, find channels to discuss rain, the CloudFormation registry, StackSets, cfn-lint, Guard and more:
Before you submit a template, we suggest that you follow these guidelines:
git remote add upstream [email protected]:aws-cloudformation/aws-cloudformation-templates.git
git fetch upstream
git checkout -b my-branch-name upstream/main
git push -u origin
.yaml suffix (not .yml or
.template). Our test scripts will auto-generate a JSON file based on the
YAML. YAML is the source of truth for all templates in this repository..yml extension. This will cause it to be skipped
by the test scripts.Description: "Create a LAMP stack using a single EC2 instance and
a local MySQL database for storage. This template demonstrates using the AWS
CloudFormation bootstrap scripts to install the packages and files necessary
to deploy the Apache web server, PHP, and MySQL when the instance is
launched."
scripts/test-all.sh script in the directory where you're working to
make sure the template is valid.pylint or eslint to make sure the code is valid.When your template is ready, submit a pull request. A member of the AWS organization will review your request and might suggest changes.
The CloudFormation Linter is an indispensable tool for developing your templates. It should be a part of every developer's workflow, and incorporated into your CI/CD pipelines.
Install cfn-lint with pip:
pip install cfn-lint
Rain is a command line interface (CLI) for CloudFormation that greatly improves the experience for authoring and deploying templates. It has many features, such as creating starter templates for various use cases, interactive deployments, modules, and more.
Rain can be installed with Brew:
brew install rain
or if you are a Go user, you can install it like this:
go install github.com/aws-cloudformation/rain/cmd/rain@latest
In the AWS CloudFormation User Guide, you can view more information about the following topics:
(top 24 of 28)
51 followers · starred Oct 2018
21 followers · starred Jan 2020
37 followers · starred Mar 2020
146 followers · starred Jun 2019
A collection of useful CloudFormation templates
Python
5,222
684 commits
updated Oct 3, 2026
This repository contains sample CloudFormation templates that you can use to help you get started on new infrastructure projects. Keep in mind that these templates are not meant to be production-ready "QuickStarts". You should take the time to learn how they work, adapt them to your needs, and make sure that they meet your company's compliance standards.
Each template in this repository passes CloudFormation Linter (cfn-lint) checks, and also a basic set of CloudFormation Guard rules based on the CIS Top 20, with exceptions for some rules where it made sense to keep the sample focused on a single use case.
Join us on Discord to discuss rain and all things CloudFormation! Connect and interact with CloudFormation developers and experts, find channels to discuss rain, the CloudFormation registry, StackSets, cfn-lint, Guard and more:
Before you submit a template, we suggest that you follow these guidelines:
git remote add upstream [email protected]:aws-cloudformation/aws-cloudformation-templates.git
git fetch upstream
git checkout -b my-branch-name upstream/main
git push -u origin
.yaml suffix (not .yml or
.template). Our test scripts will auto-generate a JSON file based on the
YAML. YAML is the source of truth for all templates in this repository..yml extension. This will cause it to be skipped
by the test scripts.Description: "Create a LAMP stack using a single EC2 instance and
a local MySQL database for storage. This template demonstrates using the AWS
CloudFormation bootstrap scripts to install the packages and files necessary
to deploy the Apache web server, PHP, and MySQL when the instance is
launched."
scripts/test-all.sh script in the directory where you're working to
make sure the template is valid.pylint or eslint to make sure the code is valid.When your template is ready, submit a pull request. A member of the AWS organization will review your request and might suggest changes.
The CloudFormation Linter is an indispensable tool for developing your templates. It should be a part of every developer's workflow, and incorporated into your CI/CD pipelines.
Install cfn-lint with pip:
pip install cfn-lint
Rain is a command line interface (CLI) for CloudFormation that greatly improves the experience for authoring and deploying templates. It has many features, such as creating starter templates for various use cases, interactive deployments, modules, and more.
Rain can be installed with Brew:
brew install rain
or if you are a Go user, you can install it like this:
go install github.com/aws-cloudformation/rain/cmd/rain@latest
In the AWS CloudFormation User Guide, you can view more information about the following topics:
(top 24 of 28)
51 followers · starred Oct 2018
21 followers · starred Jan 2020
37 followers · starred Mar 2020
146 followers · starred Jun 2019