- Robert Boscacci/
- Projects/
- Certification: AWS DevOps Pro/
- 2: Configuration Mgmt / Infrastructure as Code/
- 2: CloudFormation/
- 5: Updating CF Stacks/
5: Updating CF Stacks
·1 min
Table of Contents
How does one update a CF stack?
(Say we need to size up our ec2 instance)
- Submit updated template
- CF compares changes
- Only changed resources are changed
Ways:
- “Direct Update” (just go for it)
- “Change set” (Gives ability to do a dry-run / preview)
Potential update behaviors?
(Varies by resource type)
1. Update w/ no interruption
- Updates resource w/o disrupting ops nor physical ID
- E.g. Instance profile
2. Update w/ some interruption
- Updates w/ some interruption. Physical ID retained
- E.g. HostId
3. Replacement
- Total recreation / new physical ID.
- E.g. availability zone
Direct changes or change sets?
- Change sets are good for prod
- Direct is fine for dev or test
How to utilize update behaviors?
- Dictates how to modify resources
- Don’t do a full “replacement” if you need to retain physical ID label