ATCM - Use Firstboot Script to Automatically Tag New EBS Volumes

Summary

This article outlines how to automatically tag EBS volumes that are created by cluster nodes in Aspera Transfer Cluster Manager (ATCM). The Firstboot Script field will be used when launching a new cluster.

Steps

  1. Enter the following into the Firstboot Script field:
Key=<Your Tag Name>
Value=<Your Tag Value>
Region=$(curl -sS http://169.254.169.254/2014-11-05/dynamic/instance-identity/document/ | jq --raw-output '.region')
Instance=$(curl -sS http://169.254.169.254/latest/meta-data/instance-id)
Volume=$(aws ec2 describe-instances --instance-ids $Instance --region $Region | jq --raw-output '.Reservations[].Instances[].BlockDeviceMappings[].Ebs.VolumeId')

aws ec2 create-tags --resources $Volume --tags Key=$Key,Value=$Value --region $Region

Change <Your Tag Name> to something such as Name and change <Your Tag Value> to something such as EBS_From_ATCM.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk