What does this AWS Solution do?

Many Amazon Web Services (AWS) customers use AWS CloudFormation to manage their infrastructure as code and to help deploy AWS resources in a controlled and predictable way. DevOps teams are commonly tasked with validating AWS CloudFormation templates before launch to ensure they follow industry best practices and satisfy company-specific business and governance requirements. These teams often leverage AWS Developer Tools, which is a set of services designed to help DevOps professionals follow continuous integration and continuous delivery (CI/CD) practices and create their own pipelines to automatically build, validate, and deploy code.

To help accelerate customer development and deployment of AWS CloudFormation templates, AWS offers the AWS CloudFormation Validation Pipeline solution. This reference implementation is designed to integrate with an existing AWS CodeCommit repository and automatically provisions and configures the necessary services, including AWS CodePipeline, AWS CodeBuild, and AWS Lambda, to run a set of customizable tests for logical and functional integrity against AWS CloudFormation templates.

The following sections assume basic knowledge of DevOps practices, AWS CloudFormation, and architecting on the AWS Cloud.


AWS Solution overview

AWS offers a solution that automatically provisions and configures the AWS services necessary to create a validation pipeline for AWS CloudFormation templates. The diagram below presents the components and functionality you can build using the AWS CloudFormation Validation Pipeline implementation guide and accompanying AWS CloudFormation template.

 Click to enlarge

AWS CloudFormation Validation Pipeline solution architecture

AWS CodePipeline monitors your AWS CodeCommit repository (the pipeline source) for new or modified AWS CloudFormation templates. An AWS Lambda function runs logical pre-create tests on the template code, including a default test on template syntax, an optional test that uses AWS CodeBuild, and any user-defined tests.

A Lambda function launches test stacks in multiple AWS Regions, as defined in a customer-provided configuration file. Another Lambda function runs user-defined functional post-create tests on the test stacks.

If all tests are successful, the solution sends an Amazon Simple Notification Service (Amazon SNS) email notification to let you know that the template is ready for manual approval in AWS CodePipeline.

Once approved, the pipeline invokes a Lambda function that deploys the template to a solution-created Amazon Simple Storage Service (Amazon S3) bucket, where it also stores Amazon CloudWatch data on each Lambda function.

AWS CloudFormation Validation Pipeline

Version 1.0
Last updated: 09/2017
Author: AWS

Estimated deployment time: 10 min


AWS CloudFormation Validation Pipeline reference implementation

Leverage the AWS CloudFormation Validation Pipeline out of-the-box, or as a reference implementation for building your own validation pipeline.

Accelerates deployments

The solution is designed to integrate with an existing AWS CodeCommit repository, and validates all AWS CloudFormation templates committed to that repository, helping to accelerate template development and deployment.
Explore all AWS Solutions

Browse our portfolio of AWS-built solutions to common architectural problems.

Learn more 
Find a Partner

Find AWS certified consulting and technology partners to help you get started.

Learn more 
Start building in the console

Sign-up and start exploring our services.

Get started