RDS Aurora MySQL cluster has Backtrack enabled
Aurora MySQL DB clusters have Backtrack configured with a non-zero BacktrackWindow, retaining change records to allow rewinding to a consistent earlier time. Applies to aurora-mysql engines only.
Risk
Without Backtrack, destructive queries or admin mistakes can't be quickly undone, forcing snapshot/point-in-time restores. This increases recovery time, disrupts availability, and risks data integrity from partial restores or rollbacks.
Adversaries who alter data can cause longer impact windows before containment.
Run this check with Prowler
Run in Prowler Cloudprowler aws --checks rds_cluster_backtrack_enabledRecommendation
Enable Backtrack on Aurora MySQL clusters and set BacktrackWindow to meet RTO while balancing cost and workload. Use it with automated backups for defense in depth and resilience.
For clusters without Backtrack, provision a clone or new cluster with it enabled; monitor usage and adjust the window as change rates evolve.
Remediation
CLI
aws rds restore-db-cluster-to-point-in-time --source-db-cluster-identifier <SOURCE_DB_CLUSTER_ID> --db-cluster-identifier <DB_CLUSTER_ID> --use-latest-restorable-time --backtrack-window 3600Terraform
# Terraform: Aurora MySQL cluster with Backtrack enabled
resource "aws_rds_cluster" "<example_resource_name>" {
engine = "aurora-mysql"
master_username = "<MASTER_USERNAME>"
master_password = "<MASTER_PASSWORD>"
backtrack_window = 3600 # CRITICAL: Enables Backtrack (seconds) so the check passes
}NativeIaC
# CloudFormation: Create Aurora MySQL cluster with Backtrack enabled
Resources:
<example_resource_name>:
Type: AWS::RDS::DBCluster
Properties:
Engine: aurora-mysql
MasterUsername: "<MASTER_USERNAME>"
MasterUserPassword: "<MASTER_PASSWORD>"
BacktrackWindow: 3600 # CRITICAL: Enables Backtrack (seconds) so the check passesOther
Check Code
from prowler.lib.check.models import Check, Check_Report_AWS
from prowler.providers.aws.services.rds.rds_client import rds_client
class rds_cluster_backtrack_enabled(Check):
def execute(self):
findings = []
for db_cluster in rds_client.db_clusters:
report = Check_Report_AWS(
metadata=self.metadata(),
resource=rds_client.db_clusters[db_cluster],
)
report.resource_arn = db_cluster
report.status = "FAIL"
report.status_extended = f"RDS Cluster {rds_client.db_clusters[db_cluster].id} does not have backtrack enabled."
# Only RDS Aurora MySQL clusters support backtrack.
if rds_client.db_clusters[db_cluster].engine == "aurora-mysql":
if rds_client.db_clusters[db_cluster].backtrack > 0:
report.status = "PASS"
report.status_extended = f"RDS Cluster {rds_client.db_clusters[db_cluster].id} has backtrack enabled."
findings.append(report)
return findingsReferences
- https://docs.aws.amazon.com/config/latest/developerguide/aurora-mysql-backtracking-enabled.html
- https://docs.aws.amazon.com/securityhub/latest/userguide/rds-controls.html#rds-14
- https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Managing.Backtrack.html
- https://www.trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/aws/RDS/backtrack.html#