Delete EBS Volumes Actions
Matt Houser avatar
Written by Matt Houser
Updated over a week ago

Description

The Delete EBS Volumes action will delete one or more EBS unattached volumes.

For example, volumes which have been unattached for over 7 days can be deleted every day at 1am.

Test Mode

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

When test mode is enabled, execute your action normally then check the action logs to verify that only volumes that should have been deleted would have been deleted, and that volumes 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.

Volume Identification Method

Indicates the selection method of the EBS volumes to have snapshots created.

  • By Volume ID - Deletes the specified volumes

  • By EC2 Tag - Deletes volumes that match an EC2 tag value

  • All - Deletes all volumes

Note that an EBS volume must be detached to be deleted.

Volume IDs

Required when Volume Identification Method is set to "By Volume ID". Indicates the list of volume IDs which will be deleted.

EC2 Tag Name

Required if Volume Identification Method is "By EC2 Tag". Indicates the name of the EC2 tag used to compare.

EC2 Tag Value

Required if Volume Identification Method is "By EC2 Tag". Indicates the value of the EC2 tag used to compare.

Detachment Time

Indicate whether EBS volumes must be detached for a minimum number of days before they can be detached.

Number of Days

Indicate the minimum number of days that an EBS volume must be detached before it can be deleted.

Tracking EC2 Tag

An EC2 tag is placed on the EBS volume that will be used to track the detached date of the EBS volume. Specify the name of the tag in this field.

Create Final Snapshot

Indicate whether a final snapshot of the EBS volume should be created before the volume is deleted.

Snapshot Name

Optional. After the snapshots are created, this value is placed in the "Name" tag for the newly created snapshots. Macros can be used to include run-time data.

Description

Optional. The snapshots can have a description saved with them. Macros can be used to include run-time data.

EC2 Tags

Optional. EC2 tags can be set once the snapshots are complete. Click "Add Tag" to add a tag and fill the tag data. Any number of tags can be set, although Amazon EC2 has a limit of 10 (including the Name tag). Macros can be used in the tag values to include run-time data.

Report Target

Indicates the method in which the report will be sent.

Target Email

Indicate the target email address to which the reports will be sent. Possible options include:

  • Primary

  • Alternates

Alternate Email Addresses

Indicates the alternate email addresses to which the reports will be sent.

Report Format

Specify the format of the report. Possible options include:

  • Email

  • HTML file emailed

  • CSV file emailed

Test Mode

Enables and disabled 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.

  • ec2:DescribeTags

  • ec2:DescribeVolumes

  • ec2:CreateTags

  • ec2:DeleteTags

  • ec2:DeleteVolumes

  • ec2:CreateSnapshot

Did this answer your question?