How do I list volumes and volume tag for a given EC2 server in AWS CLI
aws ec2 describe-tags --filters "Name=tag:volume-id,Values=vol-xxxxxx" --region us-east-2 --profile xxxxx --output=text
How do I list volumes and volume tag for a given EC2 server in AWS CLI
aws ec2 describe-tags --filters "Name=tag:volume-id,Values=vol-xxxxxx" --region us-east-2 --profile xxxxx --output=text
2
Answers
You have to add
resource-id
into thefilters
as explained in describe-tags docs.This command list volume and its tags associated with ec2 instance.
Assuming you already know the instance id