Working with CloudFormation templates
To deploy a stack of resources using CloudFormation, you must first create a stack template. Templates are declarative configuration files that specify the resources you want to provision in your CloudFormation stacks. They define the resources, configurations, mappings, parameters, outputs and other settings. CloudFormation reads the template and creates the specified resources.
You can create templates using:
-
AWS Application Composer – A visual interface for designing templates.
-
AWS CloudFormation Designer – An older visual interface for template design.
-
Text Editor – Write templates directly in JSON or YAML syntax.
-
IaC generator – Generate templates from resources provisioned in your account that are not currently managed by CloudFormation. The IaC generator works with a wide range of resource types that are supported by the Cloud Control API in your Region.
The following topics show you how to use the different parts of a CloudFormation template and how they work together. You'll also learn how to use custom resources and macros to add functionality to templates and how to create modules that you can share and reuse across multiple templates. In addition, you'll find example snippets for common resource types and configurations. These can be copied and customized to speed up template development.
Topics
- Templates overview
- Template formats
- Template sections
- Create templates visually with Application Composer
- Generate templates from existing resources with IaC generator
- Specify values stored in other services using dynamic references
- Export information from a deployed CloudFormation stack
- CloudFormation-supplied parameter types
- CloudFormation-supplied resource types
- Walkthroughs
- Template snippets
- Working with Microsoft Windows stack templates