Description
DeletionProtection: true blocks deletion of the DB instance until protection is turned off. With false, an authorized deletion can proceed.
Potential impact
An accidental deletion can interrupt service while you restore the database and update its connections.
Remediation
Enable DeletionProtection on instances you need to keep and verify the applied setting. Keep tested backups for recovery.
Examples
The examples change deletion protection on a read replica. Provide the source database and remaining replication settings separately.
Before
yaml
Resources:
MyDBSmall:
Type: "AWS::RDS::DBInstance"
Properties:
DBInstanceClass: db.t3.small
SourceDBInstanceIdentifier: db-source
SourceRegion: ap-northeast-2
DeletionProtection: false
After
yaml
Resources:
MyDBSmall:
Type: "AWS::RDS::DBInstance"
Properties:
DBInstanceClass: db.t3.small
SourceDBInstanceIdentifier: db-source
SourceRegion: ap-northeast-2
DeletionProtection: true