Description

The Delete RDS Instances action will delete all RDS instances matching a specified filter.

For example, at 8am, all RDS instances ending in "-dev" can be deleted.

Test Mode

The Delete RDS Instances action includes a "test mode" as a way of determining which items will be deleted without actually deleting the items. This way, you can fine tune your action without concern for deleting the wrong items. Test Mode is on by default.

When test mode is enabled, execute your action normally then check the action logs to verify that only items that should have been deleted would have been deleted, and that items that should not have been deleted would not have been deleted.

When you are satisfied, disable Test Mode.

Settings

Please see Common Action Settings for a description of settings common to all action types.

Instance Identification Method

Indicates how the RDS instances will be selected. Valid values are:

  • By RDS Instance ID - Specify an instance ID to delete
  • All RDS Instances - All RDS instances will be deleted

RDS Instance ID

Indicates the RDS instance ID that will be deleted. Required if Instance Identification Method is set to "By RDS Instance ID". This instance must exist in the region specified.

Create a Final Snapshot

Indicates whether a final snapshot should be created of the RDS instance when it is deleted.

Final Snapshot ID

Indicates the snapshot ID of the final snapshot when the instance is deleted. This value is only required if "Create a Final Snapshot" is enabled. Macros can be used in the snapshot ID to include run-time data. See below.

Test Mode

Enables and disabled Test Mode (see above).

Macros

The following macros can be used to include some run-time information.

$(DATE)

Date of snapshot in year-month-day format

$(TIME)

Time of snapshot in 24-hour format

$(INSTANCEID)

Instance ID of the RDS instance being deleted

Macros are case-sensitive. For example, $(Time) is not valid. $(TIME) must be used.

Amazon Commands Used

The following Amazon AWS commands are used. The access key should have permission to execute all of them.

  • rds:DeleteDBInstance
  • rds:DescribeDBInstances
Did this answer your question?