AWS CloudFormation
AWS CloudFormation
AWS CloudFormation -
- AWS CF is a service that allows you to manage, configure and provision your Infrastructure as a code
- AWS CF provides a common language for you to describe and provision all the infrastructure resources in your cloud environment
- Resources are defined using CF templates
- CF interpretes the template and makes the appropriate API calls to create the resources you have defined
- Supports YAML or JSON
CF Templates -
- YAML file that defines a CF stack
- Templates have to be uploaded in S3 and then referenced in CF
- Logical IDs are used to reference resources within the template
- Physicals IDs identify resources outside of AWS CF templates, but only after the resources after created
- Template Components -
- Resources - AWS resources declared in the template (mandatory)
- Parameters - Dynamic inputs for your template
- Mappings - Statics variables for your template
- Outputs - References to what has been created (will be returned upon stack creation)
- Conditionals - List of conditions to perform resource creation
- Metadata
- Template helpers -
- References
- Functions
- You can associate the CreationPolicy attribute with a resource to prevent its status from reaching create complete until CF receives a specified number of cfn-signals or the timeout period is exceeded
- Use CF with securely configured templates to ensure that applicatins are deployed in secure configurations
Stack Sets -
- Deployed resources based on templates
- Create, update and delete stacks using templates
- Deployed through the management console, CLI or APIs
- Updating Stacks -
- AWS CF provides two methods for updating stacks: direct update or creating and executing change sets
- When you directly update a stack, you submit changes and AWS CF immediately deploys them
- Use direct updates when you want to quickly deploy your updates
- with change sets, you can preview the changes AWS CF will make to your stack, and then decide whether to apply those changes
Nested Stacks -
- Nested stacks allow re-use of CF code for common use cases
- Instead of copying out the code each time, create a standard template for each common use case and reference from within your CF templates
Comments
Post a Comment