• Stars
    star
    4,619
  • Rank 9,186 (Top 0.2 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created almost 9 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A collection of useful CloudFormation templates

AWS CloudFormation Sample Templates

Use sample AWS CloudFormation templates to learn how to declare specific AWS resources or solve a particular use case. We recommend that you use sample templates as a starting point for creating your own templates, not for launching production-level environments. Before launching a template, always review the resources that it will create and the permissions it requires.

About the Repository

The AWS CloudFormation team and approved contributors provide and maintain sample templates in the aws folder.

We also collect and make available templates developed by the community. These sample templates are located in the community folder and its subfolders. We encourage your contributions to these templates. Note, however, that we don't test, maintain, or support community templates.

Discord

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:

Join our Discord

Submitting Templates

Before you submit a template, we suggest that you follow these guidelines to help maintain consistency between templates.

  • Test your template. Can you successfully create a stack with it? When you create a stack, AWS CloudFormation uses the ValidateTemplate API to check your template. When you delete a stack, is the stack (and all of its resources) successfully deleted? Make sure users aren't left with stray resources or stacks that have deletion errors.
  • In the Description section, add a brief description of your template. The description should indicate what the template does and why it's useful. For example:
    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."
    
  • Format your template to make it human readable:
    • Err on the side of human readability. If it makes your template easier to read, do it.
    • Use cfn-lint to lint your template and make sure it is valid.
    • Consider using two-space indents to reduce line wrapping.
  • Review IAM resources. If you include IAM resources, follow the standard security advice of granting least privilege (granting only the permissions required to do a task).
  • Remove secrets/credentials from your template. You might hardcode credentials or secrets in your template when you're testing. Don't forget to remove them before submitting your template. You can use this tool to help you scrub secrets: https://github.com/awslabs/git-secrets.
  • Add your template to the correct folder so that others can discover it. If your template demonstrates a particular service, add it to the Services folder. If it uses multiple services to address a particular use case, add it to the Solutions folder.

When your template is ready, submit a pull request. A member of the AWS organization will review your request and might suggest changes. We review templates to check for general security issues, but we won't test or maintain them. If we don't get back to you within a week of your submission, use your pull request to send us a message.

Additional Resources

In the AWS CloudFormation User Guide, you can view more information about the following topics:

More Repositories

1

cfn-lint

CloudFormation Linter
Python
2,417
star
2

cloudformation-guard

Guard offers a policy-as-code domain-specific language (DSL) to write rules and validate JSON- and YAML-formatted data such as CloudFormation Templates, K8s configurations, and Terraform JSON plans/configurations against those rules. Take this survey to provide feedback about cfn-guard: https://amazonmr.au1.qualtrics.com/jfe/form/SV_bpyzpfoYGGuuUl0
Rust
1,267
star
3

cloudformation-coverage-roadmap

The AWS CloudFormation Public Coverage Roadmap
1,105
star
4

rain

A development workflow tool for working with AWS CloudFormation.
Go
785
star
5

awesome-cloudformation

A curated list of resources and projects for working with AWS CloudFormation.
575
star
6

custom-resource-helper

Simplify best practice Custom Resource creation, sending responses to CloudFormation and providing exception, timeout trapping, and detailed configurable logging.
Python
377
star
7

cloudformation-cli

The CloudFormation Provider Development Toolkit allows you to author your own resource providers and modules that can be used by CloudFormation.
Python
319
star
8

cfn-lint-visual-studio-code

CloudFormation Linter IDE integration, autocompletion, and documentation
JavaScript
254
star
9

cfn-language-discussion

Language discussions for CloudFormation template language
142
star
10

cloudformation-template-schema

Inline syntax validation, documentation links and autocompletion for your CloudFormation templates.
Java
141
star
11

aws-cloudformation-samples

Python
135
star
12

cloudformation-cli-python-plugin

The CloudFormation Provider Development Toolkit Python Plugin allows you to autogenerate Python code based on an input schema.
Python
108
star
13

aws-guard-rules-registry

Rules Registry for Compliance Frameworks
Python
106
star
14

cloudformation-resource-schema

The CloudFormation Resource Schema defines the shape and semantic for resources provisioned by CloudFormation. It is used by provider developers using the CloudFormation RPDK.
Java
92
star
15

community-registry-extensions

Python
85
star
16

aws-cloudformation-macros

This repository hosts examples of AWS CloudFormation macros.
Python
82
star
17

aws-cloudformation-resource-providers-awsutilities-commandrunner

Java
80
star
18

cloudformation-cli-go-plugin

The CloudFormation Provider Development Toolkit Go Plugin allows you to autogenerate Go code based on an input schema.
Go
52
star
19

aws-cloudformation-resource-providers-cloudformation

The CloudFormation Resource Provider Package For AWS CloudFormation
Java
48
star
20

resource-providers-list

Index page for AWS CloudFormation resource provider repos
47
star
21

cloudformation-cli-typescript-plugin

The CloudFormation Provider Development Toolkit Node.js Plugin allows you to autogenerate TypeScript code based on an input schema.
TypeScript
42
star
22

aws-cloudformation-resource-providers-logs

The CloudFormation Resource Provider Package For Amazon CloudWatch Logs
Java
32
star
23

cloudformation-cli-java-plugin

The CloudFormation Provider Development Toolkit Java Plugin allows you to autogenerate java code based on an input schema.
Java
29
star
24

aws-cloudformation-resource-providers-codeartifact

The CloudFormation Resource Provider Package for the AWS CodeArtifact service
Java
27
star
25

aws-cloudformation-resource-providers-rds

The CloudFormation Resource Provider Package For Amazon Relational Database Service
Java
27
star
26

cfn-lint-atom

Provides IDE specific integration to cfn-lint
JavaScript
27
star
27

aws-cloudformation-resource-providers-ssm

The CloudFormation Resource Provider Package For AWS Systems Manager
Java
24
star
28

aws-cloudformation-resource-providers-ses

The CloudFormation Resource Provider Package For Amazon Simple Email Service
Java
22
star
29

aws-cloudformation-resource-providers-sns

The CloudFormation Resource Provider Package For Amazon Simple Notification Service (Amazon SNS). Amazon SNS is a fully managed messaging service for both application-to-application (A2A) and application-to-person (A2P) communication.
Java
16
star
30

aws-cloudformation-resource-providers-kms

AWS Key Management Service (KMS) makes it easy for you to create and manage cryptographic keys and control their use across a wide range of AWS services and in your applications. AWS KMS is a secure and resilient service that uses hardware security modules that have been validated under FIPS 140-2, or are in the process of being validated, to protect your keys. AWS KMS is integrated with AWS CloudTrail to provide you with logs of all key usage to help meet your regulatory and compliance needs.
Java
14
star
31

aws-cloudformation-resource-providers-ecr

The CloudFormation Resource Provider Package For Amazon ECR
Java
11
star
32

aws-cloudformation-resource-providers-imagebuilder

The CloudFormation Resource Provider Package For EC2 Image Builder
Java
11
star
33

cloudformation-pkl

Pkl
11
star
34

aws-cloudformation-resource-providers-accessanalyzer

The CloudFormation Resource Provider Package For AWS IAM Access Analyzer
Java
8
star
35

aws-cloudformation-resource-providers-codeguru-profiler

The CloudFormation Resource Provider Package For Amazon CodeGuru.
Java
8
star
36

aws-cloudformation-resource-providers-rds-proxy

The CloudFormation Resource Provider Package For Amazon RDS Proxy
Java
7
star
37

aws-cloudformation-resource-providers-transitgateway

The CloudFormation Resource Provider Package For AWS Transit Gateway
Java
7
star
38

aws-cloudformation-resource-providers-organizations

The CloudFormation Resource Provider Package For AWS Organizations
Java
6
star
39

aws-cloudformation-resource-providers-stepfunctions

The CloudFormation Resource Provider Package For AWS Step Functions
Java
6
star
40

resource-schema-guard-rail

The CloudFormation Resource Schema Guard Rail allows you to evaluate resource schema compliance against CloudFormation enforced best practices
Python
6
star
41

iac-model-evaluation

HCL
6
star
42

aws-cloudformation-resource-providers-cost-explorer

CloudFormation Resource Provider Package for AWS Cost Explorer
Java
5
star
43

aws-cloudformation-resource-providers-sso

Java
5
star
44

aws-cloudformation-resource-providers-mwaa

Amazon Managed Workflows for Apache Airflow provider type for AWS CloudFormation
Java
4
star
45

aws-cloudformation-resource-providers-devops-guru

Java
4
star
46

aws-cloudformation-resource-providers-rolesanywhere

Java
4
star
47

aws-cloudformation-resource-providers-networkfirewall

Java
4
star
48

aws-cloudformation-resource-providers-cur

Java
4
star
49

aws-cloudformation-resource-providers-kendra

AWS Kendra CloudFormation Resource Providers
Java
4
star
50

aws-cloudformation-resource-providers-glue

The CloudFormation Resource Provider Package For AWS Glue
Java
4
star
51

aws-cloudformation-resource-providers-connect

The CloudFormation Resource Provider package for Amazon Connect
Java
4
star
52

cloudformation-cli-java-plugin-testing-support

Testing Framework for the CloudFormation Provider Development Toolkit Java Plugin allows you to autogenerate java code based on an input schema.
Java
3
star
53

aws-cloudformation-resource-providers-nimblestudio

Java
3
star
54

aws-cloudformation-resource-providers-sagemaker

Java
3
star
55

aws-cloudformation-resource-providers-codegurureviewer

Java
3
star
56

aws-cloudformation-resource-providers-timestream

Java
3
star
57

aws-cloudformation-resource-providers-applicationinsights

Java
3
star
58

aws-cloudformation-resource-providers-aps

AWS CloudFormation resource provider for AWS Managed Service for Prometheus
Go
3
star
59

aws-cloudformation-resource-providers-lookoutvision

The CloudFormation Resource Provider Package for Amazon Lookout for Vision
Java
3
star
60

aws-cloudformation-resource-providers-auditmanager

The CloudFormation resource provider package for AWS Audit Manager
Java
3
star
61

aws-cloudformation-resource-providers-acmpca

CloudFormation Resource Provider for the Amazon Certificate Manager Private Certificate Authority (ACM-PCA) Service.
Java
3
star
62

aws-cloudformation-resource-providers-customer-profiles

Java
3
star
63

aws-cloudformation-resource-providers-msk-serverless

Java
3
star
64

aws-cloudformation-resource-providers-ec2-lgw

Java
3
star
65

aws-cloudformation-resource-providers-wafv2

The CloudFormation Resource Provider Package For Amazon WAF v2.
Java
3
star
66

aws-cloudformation-resource-providers-lightsail

Java
3
star
67

aws-cloudformation-resource-providers-synthetics

Cloudformation resources for Cloudwatch Synthetics
Java
3
star
68

aws-cloudformation-resource-providers-athena

The CloudFormation Resource Provider Package For Amazon Athena
Java
3
star
69

aws-cloudformation-resource-providers-redshift

The CloudFormation Resource Provider Package For Amazon Redshift
Java
3
star
70

aws-cloudformation-resource-providers-ec2-flowlog

The CloudFormation Resource Provider Package For VPC Flow Logs Service
Java
3
star
71

cloudformation-cli-hooks-extension

This CloudFormation CLI extension library provides more commands for managing and configuring your Resource Hooks.
Python
3
star
72

aws-cloudformation-resource-providers-vpc-lattice

The CloudFormation Resource Provider Package For AWS VPC Lattice
Java
3
star
73

aws-cloudformation-resource-providers-licensemanager

Java
2
star
74

aws-cloudformation-resource-providers-device-advisor

https://docs.aws.amazon.com/iot/latest/developerguide/device-advisor.html
Kotlin
2
star
75

aws-cloudformation-resource-providers-resource-explorer

The CloudFormation Resource Provider Package For AWS Resource Explorer
Java
2
star
76

aws-cloudformation-resource-providers-frauddetector

Python
2
star
77

aws-cloudformation-resource-providers-budgets

https://aws.amazon.com/aws-cost-management/aws-budgets/
Java
2
star
78

aws-cloudformation-resource-providers-events

The CloudFormation Resource Provider Package For Amazon CloudWatch Events
Java
2
star
79

aws-cloudformation-resource-providers-route53resolver-outpostresolver

https://aws.amazon.com/route53/
Java
2
star
80

aws-cloudformation-resource-providers-databrew

Java
2
star
81

aws-cloudformation-resource-providers-rekognition

AWS Rekognition
Java
2
star
82

aws-cloudformation-resource-providers-amplify

The CloudFormation Resource Provider Package For AWS Amplify Console
Java
2
star
83

aws-cloudformation-resource-providers-macie

Java
2
star
84

aws-cloudformation-resource-providers-globalaccelerator

Kotlin
2
star
85

aws-cloudformation-resource-providers-memorydb

The CloudFormation Resource Provider Package For Amazon MemoryDB Service
Java
2
star
86

aws-cloudformation-resource-providers-iotwireless

Java
2
star
87

aws-cloudformation-resource-providers-iotfleetindexing

Java
2
star
88

aws-cloudformation-resource-providers-ec2-acmcerts

Java
2
star
89

aws-cloudformation-resource-providers-kafkaconnect

The CloudFormation Resource Provider Package For Amazon MSK Connect
Java
2
star
90

aws-cloudformation-resource-providers-kinesisfirehose

The CloudFormation Resource Provider Package For Amazon Kinesis Data Firehose
Java
2
star
91

aws-cloudformation-resource-providers-opsworkscm

The CloudFormation Resource Provider Package For AWS OpsWorks CM
Java
2
star
92

aws-cloudformation-resource-providers-eventschemas

Java
1
star
93

aws-cloudformation-resource-providers-fms

The CloudFormation Resource Provider Package For Amazon Firewall Manager
Java
1
star
94

aws-cloudformation-resource-providers-ses-mailmanager

AWS SES MailManager CloudFormation Resources
Java
1
star
95

aws-cloudformation-resource-providers-transfer

The CloudFormation Resource Provider Package For AWS Transfer Family
Java
1
star
96

aws-cloudformation-resource-providers-route53-recovery-readiness

Java
1
star
97

aws-cloudformation-resource-providers-datasync

The CloudFormation Resource Provider package for AWS DataSync
Java
1
star
98

aws-cloudformation-resource-providers-iot

The CloudFormation Resource Provider Package For AWS IoT
Java
1
star
99

aws-cloudformation-resource-providers-ec2-nat-gateway

The CloudFormation Resource Provider Package For VPC NAT Gateway
Java
1
star
100

aws-cloudformation-resource-providers-route53-recovery-control

Java
1
star