skip to Main Content

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


  1. You have to add resource-id into the filters as explained in describe-tags docs.

    Login or Signup to reply.
  2. This command list volume and its tags associated with ec2 instance.

    Assuming you already know the instance id

    aws ec2 describe-volumes --filters Name=attachment.instance-id,Values=i-xxxxxxxxxxx 
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search