Uly.me

cloud engineer

  • Home
  • About
  • Archives
Home/Archives for tags

February 24, 2019

AWS CLI EFS Describe Tags

How to display tags of EFS file system.

aws efs describe-tags \
--file-system-id fs-xxxxxxxx \
--query 'Tags[?Key==`tagname`].{Name:Key,Value:Value}'

aws efs describe-tags \ --file-system-id fs-xxxxxxxx \ --query 'Tags[?Key==`tagname`].{Name:Key,Value:Value}'

December 13, 2018

AWS CLI: Describe Instances

If you have a ton of EC2 instances, one way to get results quickly is to run to use AWS CLI such as “describe-instances.” Here’s an example on how to get a list of instances with a tag name equal to some value. In addition, you limit the display only results you want displayed.

$ aws ec2 describe-instances \
--query 'Reservations[].Instances[].Tags[?Key==`Name`].Value' \
--filter Name=tag:Project,Values=web \
--region us-east-1 \
--profile default \
--output text

$ aws ec2 describe-instances \ --query 'Reservations[].Instances[].Tags[?Key==`Name`].Value' \ --filter Name=tag:Project,Values=web \ --region us-east-1 \ --profile default \ --output text

This returns values of the “Name” tag name in instances where they occur.

  • « Previous Page
  • 1
  • 2
  • 3
  • Cloud
  • Linux
  • Git

Copyright © 2012–2021