Using Amazon ECS with Amazon CloudFormation - Amazon Elastic Container Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Using Amazon ECS with Amazon CloudFormation

Amazon ECS is integrated with Amazon CloudFormation, a service that you can use to model and set up Amazon resources with templates that you define. Amazon CloudFormation uses templates that are either a YAML or JSON formatted text file. Templates are like blueprints for the Amazon resource you want to create. When you create and submit a template, Amazon CloudFormation creates a stack. You manage the resources you defined in your template thought the stack. When you want to create, update, or delete a resource, you create, update, or delete the stack that was created from that resource. When it comes to updating your stacks, you need to create a change set first. Change sets show you what is impacted by the change before you make it. This keeps you from deleting databases accidently by changing your database name, for example. For more information on templates, stacks, and change sets, see How Amazon CloudFormation works in the Amazon CloudFormation User Guide.

By using Amazon CloudFormation, you can spend less time creating and managing your resources and infrastructure. You can create a template that describes all the Amazon resources that you want, such as Amazon ECS clusters, task definitions, services. Then, Amazon CloudFormation takes care of provisioning and configuring those resources for you.

Amazon CloudFormation also allows you to reuse your template to set up your Amazon ECS resources in a consistent and repeatable manner. You describe your resources one time and then provision the same resources again across multiple Amazon Web Services accounts and Amazon Web Services Regions.

Amazon CloudFormation templates can be used with both the Amazon Web Services Management Console or the Amazon Command Line Interface to create resources.

To learn more about Amazon CloudFormation, see the following resources: