AWS Cloud Operations & Migrations Blog

A Review of AWS CloudFormation Releases in 2016

AWS CloudFormation allows developers and systems administrators to create and manage a collection of related AWS resources (called a stack) by provisioning and updating them in an orderly and predictable way. In this blog post, we will look back on the CloudFormation features and updates introduced in 2016, including:

  • New AWS resources you can provision with CloudFormation.
  • AWS CodePipeline integration to enable continuous delivery of infrastructure.
  • Support for YAML and the AWS Serverless App Model (AWS SAM) to improve the developer experience.
  • Change sets and cross-stack references to enhance ClouldFormation stack management capabilities.

Service Coverage

In 2016, we added support for several features and services in CloudFormation.

• Amazon GameLift  • Amazon Kinesis Firehose
• Amazon Elasticsearch Service • AWS IoT
• Amazon EMR • AWS Certificate Manager
• Amazon EC2 Container Registry • Application Auto Scaling (for Amazon ECS and Spot)
• Managed NAT • Application load balancer
• Amazon API Gateway • AWS CodeCommit
• Amazon CloudWatch Events • Amazon API Gateway usage plans
• Amazon EC2 Dedicated Hosts • Amazon ElastiCache Redis clusters
• VPC Flow Logs • AWS CodeBuild
• Amazon GameLift • Amazon Kinesis Firehose

As of today, you can use CloudFormation to provision 180 AWS resource types. For information about the supported resources, see AWS Resource Types Reference in the AWS CloudFormation User Guide.

AWS CodePipeline integration

You can now use AWS CodePipeline to build a continuous delivery pipeline for CloudFormation stacks. This allows you to build, test, and deploy AWS infrastructure changes modeled as CloudFormation templates.

YAML Support

You can now create YAML-formatted templates to describe your AWS resources and properties in AWS CloudFormation in addition to JSON. YAML-formatted CloudFormation templates follow the same anatomy as existing JSON-formatted templates and support all of the same features. For more information about YAML support, see AWS CloudFormation Template Formats in the AWS CloudFormation User Guide.

Serverless Application Model

AWS SAM helps you more effectively model, package, and deploy serverless applications that use services like AWS Lambda, Amazon DynamoDB, and Amazon API Gateway. SAM is a specification for describing Lambda-based applications. It offers a syntax designed specifically for expressing serverless resources. AWS SAM is made available under the Apache 2.0 license, enabling customers and partners to adopt and incorporate it into build, deployment, monitoring, and management tools with a commercial-friendly license. For more information, see Introducing the AWS Serverless Application Model in the AWS CloudFormation User Guide and the model on GitHub.

Change Sets

We introduced the concept of a change set to help you preview the changes that CloudFormation will apply when it updates a stack with more recent template or parameter values. You create a change set by submitting changes against the stack you want to update. CloudFormation compares the stack to the new template or parameter values and produces a change set that you can review and then execute. This helps you to understand the resource-level changes (for example, adding, deleting, or modifying instances) that CloudFormation will apply to your live stack so you can be sure the changes are in line with your expectations. For more information, see Updating Stacks Using Change Sets in the AWS CloudFormation User Guide.

Cross-Stack References

You can now create cross-stack references that let you share outputs from one stack with another stack. This lets you share things such as IAM roles, VPC information, and security groups. Previously, you had to use CloudFormation custom resources to accomplish this. Now, you can use the new ImportValue intrinsic function to export values from one stack and import them to another stack. For more information, see Walkthrough: Refer to Resource Outputs in Another AWS CloudFormation Stack in the AWS CloudFormation User Guide.

The AWS CloudFormation team also made improvements to the overall functionality of the CloudFormation service:

  • CloudFormation resource specification
    • AWS CloudFormation now publishes a machine-readable specification of the AWS resource types and their supported properties. The CloudFormation resource specification file is a JSON-formatted text file that can help you with template authoring and validation. For more information, see AWS CloudFormation Resource Specification in the AWS CloudFormation User Guide.
  • Retain resources
    • For stacks in the DELETE_FAILED state, you can now use the RetainResources parameter to retain resources that AWS CloudFormation could not delete. (DELETE_FAILED is a failure state that occurs when AWS CloudFormation could not delete a resource.) For more information, see Delete Stack Fails in the AWS CloudFormation User Guide.
  • Update rollback
    • You can now manually reverse an update for stacks that failed to roll back automatically.  Previously, when CloudFormation could not roll back all changes during an update, you had to delete the stack or contact AWS Support to return the stack to a working state. For more information, see Continue Rolling Back an Update in the AWS CloudFormation User Guide.
  • Skip resources during rollback
    • You can now also skip the resources that AWS CloudFormation could not successfully roll back. For more information, see Troubleshooting AWS CloudFormation in the AWS CloudFormation User Guide.
  • UpdatePolicy attribute for Auto Scaling
    • You can now specify how AWS CloudFormation handles updates to the Auto Scaling group resource. You can use the AutoScalingReplacingUpdate property with the UpdatePolicy attribute to specify whether an Auto Scaling group and the instances it contains are replaced when you update the Auto Scaling group. During a replacement, AWS CloudFormation retains the old Auto Scaling group until the new one is successfully created.  AWS CloudFormation can roll back to the old Auto Scaling group if the update fails. For more information, see UpdatePolicy Attribute in the AWS CloudFormation User Guide.
  • New intrinsic functions
    • Substitute variables in an input string with values that you specify with the Fn::Sub function.
    • Split a string into a list of string values with the Fn::Split function.
    • Create cross-stack references with the Fn::ImportValue function.
  • AWS CloudFormation service role
    • You can now specify an IAM role that allows AWS CloudFormation to create, update, or delete your stack resources. Using a service role allows you to explicitly specify the actions that AWS CloudFormation can perform, which might not always be the same actions you or other users can perform. For example, you might have administrative privileges, but you can limit AWS CloudFormation access to Amazon EC2 actions only. For more information, see AWS CloudFormation Service Role in the AWS CloudFormation User Guide.
  • New Command Line Interface (CLI) commands
    • Specify local references in your template instead of manually uploading the files to an Amazon S3 bucket and then adding the location to your template.
    • Create and execute change set actions with a single command. This command is useful for quickly creating or updating stacks that contain transforms.
  • CloudFormation Designer diagram download
    • You can now download the diagram of your AWS CloudFormation template resources, created in the AWS CloudFormation Designer using a drag-and-drop interface, in a .png file format. CloudFormation Designer is part of the AWS CloudFormation console.

For more information about CloudFormation releases and updates, see the release history page.

The AWS CloudFormation team looks forward to making more improvements to your CloudFormation experience in 2017.