AWS Cloudformation stack - best practices


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.

feita há 7 meses218 visualizações
1 Resposta


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.

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".

profile picture
respondido há 7 meses
profile pictureAWS
avaliado há 7 meses
  • 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.

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas