1
votes

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html says that PreferredBackupWindow is used if automated backups are enabled using the BackupRetentionPeriod parameter.

It also says that BackupRetentionPeriod Must be a value from 1 to 35.

It is actually possible to disable the automated back-ups? Setting BackupRetentionPeriod to 0 using CloudFormation return the following error: Invalid backup retention period: 0. Retention period must be between 1 and 35.

2

2 Answers

1
votes

Unfortunately, you can't disable automated backups on Aurora. Even if you wanted to work around the issue by finding the most recent backup with

aws rds describe-db-cluster-snapshots --db-cluster-identifier=dbname | jq -r .DBClusterSnapshots[].DBClusterSnapshotIdentifier | tail -n1

and then attempting to manually delete the backup with

aws rds delete-db-cluster-snapshot --db-cluster-snapshot-identifier rds:dbname-2021-03-30-04-56

this results in the error

An error occurred (InvalidDBClusterSnapshotStateFault) 
when calling the DeleteDBClusterSnapshot operation: 
Only manual snapshots may be deleted.
0
votes

It appears that you have a read replica for your DB instance. Unfortunately due to the instance having read replicas connecting to it, you won't be able to set backup retention to 0. Backups are required to create and manage read replicas binary logs.

"Before a DB instance can serve as a replication source, you must enable automatic backups on the source DB instance by setting the backup retention period to a value other than 0. This requirement also applies to a read replica that is the source DB instance for another read replica."