Reducing the backup retention duration can reduce an organization’s ability to re-establish service in case of a security incident.

Data backups allow to overcome corruption or unavailability of data by recovering as efficiently as possible from a security incident.

Backup retention duration, coverage, and backup locations are essential criteria regarding functional continuity.

Ask Yourself Whether

There is a risk if you answered yes to any of those questions.

Recommended Secure Coding Practices

Increase the backup retention period to an amount of time sufficient enough to be able to restore service in case of an incident.

Sensitive Code Example

For Amazon Relational Database Service clusters and instances:

resource "aws_db_instance" "relational_database" {
  name                 = "non_compliant_db"
  backup_retention_period = 2 # Sensitive
}

Compliant Solution

For Amazon Relational Database Service clusters and instances:

resource "aws_db_instance" "relational_database" {
  name                 = "compliant_db"
  backup_retention_period = 5
}