Protecting resources from accidental deletion
In general, automation is the best way to avoid mistakes that can result in loss of service, data, or both. However, there are cases where human intervention is needed to address exceptional situations. In a situation of urgency, the operator might need to build an ad hoc script quickly or take manual action under pressure.
Some AWS resources allow resource protection to prevent costly mistakes that can lead to serious or even irreversible damage. In this recipe, you’ll learn how to protect RDS databases, DynamoDB tables, and CloudFormation stacks from accidental deletion.
Getting ready
To complete this recipe, you need a bash command line with the AWS CLI, as indicated in the Technical requirements section at the beginning of this chapter.
How to do it…
- Create a simple RDS database. This will return the full configuration:
aws rds create-db-instance --db-instance-class \ db.t3.micro --db-instance-identifier...