Delete EBS Storage on Instance Termination | Teradata Vantage on AWS (DIY) - 2.2 - Setting EBS Storage for Deletion on Instance Termination - Teradata Vantage on AWS

Teradata Vantageā„¢ on AWS (DIY) Installation and Administration Guide

Product
Teradata Vantage on AWS
Release Number
2.2
Release Date
May 2021
Content Type
Administration
Configuration
Installation
Publication ID
B035-2800-041K
Language
English (United States)
PrerequisiteInstall and configure the AWS Command Line Interface (CLI) before completing this procedure. See Amazon User Guide for Linux Instances .
If you did not originally configure a Teradata Vantage on AWS (DIY) instance for EBS volume deletion on termination, you can enable this feature after deploying the instance. By completing this procedure, you avoid incurring storage-specific charges on instance termination.

You can modify this setting only when the instance is running.

  1. Check whether EBS volumes are set to delete on termination.
    1. From the EC2 Console, select Instances.
    2. Select the instance you want to check.
    3. From the Description tab, select the EBS volume next to Block devices.
    If Delete on termination is set to False, EBS volumes are not deleted on termination. To change this setting, continue with the next steps.
  2. From the EC2 Console, select Instances.
  3. Note the Instance ID and Public IP of the instance you want to modify.
  4. From your SSH client console, log on to the instance using the public IP address you noted earlier.
  5. Using AWS CLI, run the following commands to get the information on all the volumes associated with the instance.
    # sudo su -
    # aws ec2 describe-instance-attribute --instance-id [instance_id] --attribute blockDeviceMapping

    where the instance_id is the instance ID you noted earlier.

  6. Note the DeviceName on the volume that has DeleteOnTermination set to False.
  7. Run the following command to set the DeleteOnTermination to true.
    # aws ec2 modify-instance-attribute --instance-id [instance_id] --block-device-mappings "[{\"DeviceName\": \"[DeviceName]\",\"Ebs\":{\"DeleteOnTermination\":true}}]"
    where:
    • The instance_id is the instance ID you noted earlier.
    • The DeviceName is the device name you noted earlier.
    Your EBS volumes will be deleted on termination.
  8. [Optional] To verify that DeleteOnTermination is set to True, complete step 1 again or run the following command.
    # aws ec2 describe-instance-attribute --instance-id [instance_id] --attribute blockDeviceMapping

    where the instance_id is the instance ID you noted earlier.

    If the parameter value is True, EBS volumes will be deleted on instance termination.