A curated list of resources and projects for working with AWS CloudFormation.
- Awesome CloudFormation
- Contents
- CloudFormation Samples
- Authoring and Testing Tools
- CLI Tools
- Code Generation
- Custom Resource Development
- Third Party Resource Types
- Third Party Hooks
- Public Coverage Roadmap
- Blog Posts and Talks
- Documentation
- Contribute
- License Summary
The following are pre-built CloudFormation Samples demonstrating how to use AWS CloudFormation to construct various canned resources, modules, applications or resource groupings.
- aws-cf-templates: Free Templates for AWS CloudFormation
- aws-cloudformation-templates: Sample AWS CloudFormation templates which are intended to support learning how to declare specific AWS resources or solve particular use cases.
- aws-quickstart: Automated gold-standard deployments on AWS
- asecure.cloud: A free repository of customizable AWS security configurations and best practices
- aws-cloudformation-samples: Reusable CloudFormation modules to jump start your collection.
- aws-cloudformation-samples: Sample CloudFormation Resource Types
- aws-cloudformation-samples: Sample CloudFormation Hooks
These tools are designed to assist in the authoring and testing process for AWS CloudFormation. Tools include template generation, linting and testing applications.
- AWSConsoleRecorder: Records actions made in the AWS Management Console and outputs the equivalent CLI/SDK commands and CloudFormation/Terraform templates.
- Former2: Generate CloudFormation / Terraform / Troposphere templates from your existing AWS resource
- cfn-python-lint: Validate CloudFormation yaml/json templates against the CloudFormation spec and additional checks. Includes checking valid values for resource properties and best practices.
- cfn-guard: A set of tools to check AWS CloudFormation templates for policy compliance using a simple, policy-as-code, declarative syntax
- Visual Studio Code extension: CloudFormation Linter integration, autocompletion, reference documentation links on hover
- cfn_nag: The cfn-nag tool looks for patterns in CloudFormation templates that may indicate insecure infrastructure.
- taskcat: taskcat is a tool that tests AWS CloudFormation templates. It deploys your AWS CloudFormation template in multiple AWS Regions and generates a report with a pass/fail grade for each region.
- org-formation: a tool that helps you write CloudFormation for your AWS Organization resources and create links between regular cloudformation resources across your accounts and regions.
- cfn flip: a tool that converts AWS CloudFormation templates between JSON and YAML formats.
- cfn-diagram: CLI tool to visualise CloudFormation templates as diagrams.
- cfsec: CloudFormation static analysis to identify potential misconfigurations before they reach production.
This section contains tools which have been designed to improve the experience of interacting with the CloudFormation service through a terminal session.
- awscfncli: awscfncli helps build and manage complex AWS CloudFormation stacks.
- stacker: An AWS CloudFormation Stack orchestrator/manager.
- sceptre: Sceptre is a tool to drive AWS CloudFormation. It automates the mundane, repetitive and error-prone tasks, enabling you to concentrate on building better infrastructure.
- stackup: Stackup provides a CLI and a simplified Ruby API for dealing with AWS CloudFormation stacks.
- cfn-teardown: Cleanup CloudFormation stacks respecting the order of dependencies.
- rain: A command line tool for working with AWS CloudFormation. It has tools for creating, comparing, and formatting templates and a pleasant CLI experience for creating, updating, and deleting stacks.
If you prefer imperative coding, or just using your favourite programming language, the following projects are intended to abstract the creation of AWS CloudFormation templates.
- aws-cdk: The AWS Cloud Development Kit (AWS CDK) is an open-source software development framework to define cloud infrastructure in code and provision it through AWS CloudFormation.
- CloudFormation Snippets for VS Code: This VS Code extension adds autocompletion for all the resources that AWS CloudFormation supports.
- serverless-application-model: The AWS Serverless Application Model (SAM) is an open-source framework for building serverless applications. It provides shorthand syntax to express functions, APIs, databases, and event source mappings. With just a few lines of configuration, you can define the application you want and model it.
- eksctl: A CLI tool that uses CloudFormation to create clusters on EKS.
- mu: Similar to how the Serverless Framework improved the developer experience of Lambda and API Gateway, this tool makes it easier for developers to use EKS or ECS as a microservices platform.
- OpenJS Architect: Generate AWS CloudFormation and AWS Serverless Application Model code from a very terse and friendly high level manifest file written in
JSON
,YAML
,TOML
or.arc
format - troposphere (Python): The troposphere library allows for easier creation of the AWS CloudFormation JSON by writing Python code to describe the AWS resources. troposphere also includes some basic support for OpenStack resources via Heat.
- sparkleformation (Ruby): A magical Ruby infrastructure orchestration DSL
- VaporShell (PowerShell): A PowerShell module for building, packaging and deploying AWS CloudFormation templates.
- cfndsl: Ruby DSL for generating AWS CloudFormation templates.
- cfhighlander: Ruby DSL for generating AWS CloudFormation templates using Cfndsl in a modular and extensible manner
When you need to extend AWS CloudFormation to support your own personal or organizational use-cases, the following tools are intended to support the development experience with the original Custom Resources functionality and the new CloudFormation Registry experience.
- cloudformation-cli: The CloudFormation Provider Development Toolkit allows you to author your own resource providers that can be used by CloudFormation.
- cloudformation-cli-go-plugin: The CloudFormation Provider Development Toolkit Go Plugin allows you to autogenerate Go code based on an input schema.
- cloudformation-cli-java-plugin: The CloudFormation Provider Development Toolkit Java Plugin allows you to autogenerate Java code based on an input schema.
- cloudformation-cli-python-plugin: The CloudFormation Provider Development Toolkit Python Plugin allows you to autogenerate Python code based on an input schema.
- custom-resource-helper: Simplify best practice Custom Resource creation, sending responses to CloudFormation and providing exception, timeout trapping, and detailed configurable logging.
The following third-party vendors have created resource types using the CloudFormation CLI and can be downloaded and added to your accounts via the Registry.
- Atlassian Creates Atlassian::Opsgenie::User, Atlassian::Opsgenie::Team, and Atlassian::Opsgenie::Integration
- Datadog Creates Datadog::Integrations::AWS, Datadog::Monitors::Monitor, Datadog::Monitors::Downtime, and Datadog::IAM::User
- Densify Creates Densify::Optimization::Recommendation
- Dynatrace Creates Dynatrace::Installer::Agent
- Fortinet Creates Fortinet::FortiGate::SystemAdmin, Fortinet::FortiGate::SystemDns, and Fortinet::FortiGate::SystemInterface
- NewRelic Creates NewRelic::Alerts::NrqlAlert
- Spotinst Creates Spotinst::Elastigroup::Group
- Open Policy Agent Hook to allow policy-based decisions on stacks using Open Policy Agent
The Public Coverage Roadmap is supported by the AWS CloudFormation team to help prioritise coverage work streams and resource improvements.
- aws-cloudformation-coverage-roadmap: This is a public roadmap focused on upcoming coverage support for CloudFormation. Coverage prioritisation is influenced by contributions and feedback to this roadmap.
Our community is our most powerful tool, and the following are hand picked submissions from some of our favourite contributors.
- YAML Is Better than Your Favorite Language: Fightin' words about Infrastructure as code by Ben Kehoe
- AWS CloudFormation Custom Resource Types: A Walkthrough by Ian McKay
- The OPA AWS CloudFormation Hook
CloudFormation's public documentation is also open-sourced and we love to accept contributions.
- cloudformation-user-guide: CloudFormation's public documentation source repository
- aws-cfn-resource-specs: A Completely Tracked, Versioned, and Audited Collection Store of CloudFormationResource.json Specification Files. These are the specification files created by AWS and ingested by tools wrapped around CloudFormation template development, such as most tools listed under the Code Generation section. The repository includes detailed, automatically generated changelogs about each new release, such as information on new resource types and what regions support them.
- AWS CloudFormation Workshop: A workshop that takes you through CloudFormation from the beginning up to more advanced topics.
- Scale Your CloudFormation: An in-depth guide for intermediate users on becoming successful with Infrastructure as Code on AWS
Contributions welcome! Read the contribution guidelines first.
This sample code is made available under a modified MIT license. See the LICENSE file.