Docker on Amazon Web Services
上QQ阅读APP看书,第一时间看更新

Introduction to AWS CloudFormation

AWS CloudFormation is a managed AWS service that allows you to define AWS services and resources using infrastructure as code, and is an alternative to using the AWS console, CLI, or various SDKs for deploying your AWS infrastructure. Although there is bit of a learning curve to master CloudFormation, once you have the basics of using CloudFormation under your belt, it represents an extremely powerful approach to deploying your AWS infrastructure, particularly once you start deploying complex environments. 

When using CloudFormation, you define one or more resources in a CloudFormation template, which is a convenient mechanism to group related resources in a single place. When you deploy your template, CloudFormation will create a stack that comprises the physical resources defined in your template. CloudFormation will deploy each resource, automatically determining any dependencies between each resource, and optimise the deployment so that resources can be deployed in parallel where applicable, or in the correct sequence when there are dependencies between resources. The best news is that all of this powerful capability comes for free you only pay for the resources you consume when you deploy your stacks via CloudFormation.

It's also important to note that there are many third-party alternatives to CloudFormation  for example, Terraform is very popular, and traditional configuration management tools such as Ansible and Puppet also include support for deploying AWS resources. My personal favorite is CloudFormation given it is natively supported by AWS, has good support for a wide variety of AWS services and resources, and natively integrates with the AWS CLI and services such as CodePipeline (we will leverage this integration later on in this book in Chapter 13 - Continuous Delivering ECS Applications).