AWS Cloudformation stack - best practices

0

Hello Team.

I am starting with cloudformation to create aws resources, so I would like to have some recommendations and best practices according your experience.

When I create cloudformation stacks to create resources, I understand these stacks must keep forever? or if I delete the stack, all my resources will be deleted? Is it possible to update some parameters in the stack? and this will delete the current resource and create new resource with new parameters?

Thank you.

Orlando
질문됨 7달 전212회 조회
1개 답변
0

Hello.

The parameters you update may replace the resource.
As described in the document below, if the parameter type is "Replacement", if you update it, it will be replaced with a new resource.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html

If you want to keep the resources even if you delete the CloudFormation stack, the resources will be retained by creating it with "DeletionPolicy" set to "Retain".
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html

profile picture
전문가
답변함 7달 전
profile pictureAWS
전문가
검토됨 7달 전
  • Yes, DeletePolicy = Retain is possible. But, best practice is to keep resources linked to a stack all the time to be able to manage the resource config from the stack by updates to the template.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠