3 ms·
This is a step in the right direction but the lack of consistent error handling and having some resources created that can't be referenced are still huge pain p
by kenbreeman 11y ago
This is a step in the right direction but the lack of consistent error handling and having some resources created that can't be referenced are still huge pain points (e.g. the default security group and route table).
I've had the most success using CloudFormation to create an entirely new stack, test it, cut over, then delete the old one... definitely not optimal.
- mryan 11y agoReferences to existing resources, such as the default SG, can be handled with stack parameters. You can pass in its ID as a parameter to the stack, and refer to this parameter in your launch configs or ingress rules. An example from one of my client's stacks: "Parameters": { "DefaultSG": { "Type": "AWS::EC2::SecurityGroup::Id", "Default": "sg-abc123" }, Personally I prefer to create a new SG to replace the default one as it means all of my infrastructure is part of a CF stack, but the parameter method can be used to partially manage (some) non-CF resources.