---
title: "A passing backup check did not mean enough retention | Vishcore"
description: "In our AWS lab, the test “RDS automated backups are retained for at least 7 days” read OK on a database with automated backups turned off."
canonical: https://vishcore.com/notes/rds-backup-retention-trap
---

notes

# A passing backup check did not mean enough retention

Published 23 November 2026

In our AWS lab, the test “RDS automated backups are retained for at least 7 days” read OK on a database with automated backups turned off. When we turned backups on with one day of retention, two backup tests moved from GAP to OK, and that 7-day test moved the other way, from OK to GAP.

The database lost nothing in that change: it went from no automated backups to one day of them. The test that had read OK was answering a narrower question than its name suggests.

## The lab and the run

The lab is a Vishcore-owned AWS environment that runs one Terraform configuration in two modes, gap and fixed. On 2026-10-23, in `us-east-1`, we scanned the gap mode, applied the fixed mode, scanned again, and compared the two scans. Both scans evaluated 193 tests, with the same target, the same check selection, and the same rules catalog.

## One setting, three tests

The database’s backup setting is one Terraform attribute. Gap mode sets `backup_retention_period = 0`; fixed mode set it to 1. Three tests read that setting. Each cell below is what that mode’s scan recorded:

| Test | Gap mode: 0 days | Fixed mode: 1 day |
| --- | --- | --- |
| RDS databases have automated backups or retained snapshots | GAP | OK |
| RDS instances and clusters take automated backups | GAP | OK |
| RDS automated backups are retained for at least 7 days | OK | GAP |

Lab-proven in a Vishcore-owned sandbox, not a client environment. Not an audit opinion. An OK row means the scanner observed the fixed posture at scan time.

## Why the 7-day test read OK first

At the time of that run the 7-day test did not count a retention of 0 as a short retention, so with backups off it read OK. The rule has since changed: a database with backups off now reads GAP too. One day is a real retention below the 7-day mark, so it reads GAP.

Each of the three tests answers one question. The first two ask whether backups exist. The third asks whether the retention that exists is long enough. With backups off, its OK said nothing about how long backups were kept: there were none.

That is why one OK row is not a verdict on an area. Read the rows that look at the same setting together, and read the setting itself.

## What we recommend, and what the lab proved

Our fixed example shows `backup_retention_period = 7`. The scanner expects at least 7 days, and a value of 7 or higher passes all three tests.

The lab applied one day only to prove that the backup toggle works. One day is below the scanner’s 7 days and is never the recommended value. The lab did not apply 7, so we do not claim that row at OK from the lab:

The retention example shows 7 days; the lab applied 1 day as toggle proof, and the 7-day row is not lab-proven at OK.

We kept the row that moved from OK to GAP in the published re-scan. A change that moves two rows to OK and one to GAP is more useful shown whole than cut down to the rows that improved.

## A side effect: the snapshot tests had something to test

Turning backups on also changed which tests applied. In gap mode no RDS snapshot existed, so two snapshot tests, “RDS snapshots are encrypted at rest” and “Manual RDS DB snapshots are not shared publicly”, were not applicable. Fixed mode created an automated snapshot through backup retention, plus one manual snapshot, and both tests moved from not applicable to OK. Both snapshots inherit encryption from the encrypted database, and neither is shared publicly.

Not applicable is not the same as GAP. Here it meant there was no snapshot to test.

## What not to copy from the lab

The excerpts on our page show the smallest change the scanner observed:

Minimal change observed by the scanner, not a complete or production-ready configuration.

They are partial snippets, and we did not run `terraform validate` or `terraform fmt` on them. The lab also has settings that belong only in a lab: its VPC has no internet gateway and no NAT, and its certificates were short-lived and self-signed. Do not copy those either.

## Checking your own databases

If your Terraform sets `backup_retention_period`, look at the value, not only at whether a backup test passes. In the lab, 0 left automated backups off and still read OK on the 7-day test; 1 turned them on and read GAP on it.

The Terraform excerpts, the re-scan rows, and the limits of what the lab proved are on our Terraform fixes page: [RDS backups and retention](https://vishcore.com/resources/terraform-fixes#fix-rds-backups-and-retention).

## Sources

- [Terraform fixes: RDS backups and retention](https://vishcore.com/resources/terraform-fixes#fix-rds-backups-and-retention)
- [Terraform fixes: the retention trap](https://vishcore.com/resources/terraform-fixes#retention-trap)
- [Terraform fixes: RDS snapshot encryption](https://vishcore.com/resources/terraform-fixes#fix-rds-snapshot-encryption)

## Want a control like this checked in your own account?

Tell us the control and your deadline. We confirm fit before requesting access.

[All notes](https://vishcore.com/notes)

[Start discovery](https://vishcore.com/start-discovery)
