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
More on Observability, Security Services and IaC
How are CloudWatch metrics organized?BeginnerHow do CloudWatch Logs groups, streams and Logs Insights work?BeginnerExplain CloudWatch alarm states and missing data handling.AdvancedWhat is the CloudWatch Embedded Metric Format?AdvancedWhat does EC2 not report to CloudWatch by default?IntermediateWhat does CloudTrail record?Beginner