The Delete RDS Snapshots action can be used to delete many RDS snapshots based on specific criteria. Possible criteria includes the snapshots ID and database instance ID.
For example, it can be used to:
delete all snapshots
delete all snapsnots older than 7 days
delete only snapshots that contain "backup" in it's id.
delete snapshots that contain "backup" in it's id and are older than 5 days
The Delete RDS Snapshots action includes a "test mode" as a way of determining which snapshots will be deleted without actually deleting the snapshots. This way, you can fine tune your action without concern for deleting the wrong snapshots. Test Mode is on by default.
When test mode is enabled, execute your action normally then check the action logs to verify that only snapshots that should have been deleted would have been deleted, and that snapshots that should not have been deleted would not have been deleted.
When you are satisfied, disable Test Mode.
Please see Common Action Settings for a description of settings common to all action types.
Snapshot Identification Method
Indicates the method in which snapshots will be selected for possible deletion. Options include:
By Snapshot ID
By Source ID (instance/cluster)
By Resource Tag
Resource Tag Name
Required if "Snapshot Identification Method" is set to "By Resource Tag". Specifies the name of the resource tag to use for comparison when selecting snapshots.
Required if "Snapshot Identification Method" is not set to "All Snapshots". Specifies the comparison to use when selecting snapshots.
Indicates the deletion scheme used to decide if snapshots should be deleted or preserved. Options include:
Delete All Snapshots - All snapshots selected will be deleted.
Simple, Oldest First - Older snapshots will be deleted based on age, newer snapshots will be preserved.
Grandfather-Father-Son - Snapshots will be preserved based on a minimum number of daily, weekly, monthly, and yearly snapshots.
Only snapshots older than the specified number of days will be deleted.
Minimum To Keep
Indicates the minimum number of snapshots to keep. Newer snapshots are favoured to keep over older snapshots.
When enabled, the action group snapshots together and apply delete scheme on each group independently. Possible options include:
None - No grouping will occur.
By Source ID - Snapshots will be grouped based on the source RDS instance or cluster.
By Resource Tag - Snapshots will be grouped based on the value of a specified resource tag.
Grouping Resource Tag Name
Name of the resource tag to use to group snapshots.
Include Cluster Snapshots
Amazon Aurora uses cluster snapshots. The rest of the RDS engines (MySQL, Microsoft SQL Server, Oracle, and PostgreSQL) use instance snapshots. For new actions, the default is on. For old actions, the default is off.
Enables and disables Test Mode (see above).
Amazon Commands Used
The following Amazon AWS commands are used. The access key should have permission to execute all of them.