Creating and managing stacks with Amazon CloudFormation
A stack is a collection of Amazon resources that you can manage as a single unit. In other words, you can create, update, or delete a collection of resources by creating, updating, or deleting stacks. All the resources in a stack are defined by the stack's CloudFormation template. A stack, for instance, can include all the resources required to run a web application, such as a web server, a database, and networking rules. If you no longer require that web application, you can simply delete the stack, and all of its related resources are deleted.
CloudFormation ensures all stack resources are created or deleted as appropriate. Because CloudFormation treats the stack resources as a single unit, they must all be created or deleted successfully for the stack to be created or deleted. If a resource can't be created, CloudFormation rolls the stack back and automatically deletes any resources that were created. If a resource can't be deleted, any remaining resources are retained until the stack can be successfully deleted.
You can create and manage stacks by using the CloudFormation console
Note
You are charged for the stack resources for the time they were operating (even if you deleted the stack right away).
Topics
- Using the Amazon CloudFormation console
- Using the Amazon Command Line Interface
- Amazon CloudFormation stack updates
- Detecting unmanaged configuration changes to stacks and resources
- Bringing existing resources into CloudFormation management
- Amazon CloudFormation stack creation events
- Stack failure options
- Moving resources between stacks
- Resource type support
- Exporting stack output values
- Listing stacks that import an exported output value
- Working with nested stacks
- Working with Microsoft Windows stacks on Amazon CloudFormation
- Managing Amazon CloudFormation events using Amazon EventBridge
- Examples for creating and managing CloudFormation stacks with the Amazon CLI and PowerShell