Interview Prep/AWS/Observability, Security Services and IaC

What are DeletionPolicy and UpdateReplacePolicy?

IntermediateConceptObservability, Security Services and IaC
Answer

DeletionPolicy (Delete, Retain, Snapshot, RetainExceptOnCreate) controls what happens to a resource when its logical ID is removed or the stack is deleted. UpdateReplacePolicy does the same when an update replaces the resource. Stateful resources (RDS, EBS, S3) should use Snapshot or Retain.

Database:
  Type: AWS::RDS::DBInstance
  DeletionPolicy: Snapshot
  UpdateReplacePolicy: Snapshot
aws All AWS questions

More on Observability, Security Services and IaC