aws ec2 describe-instances --instance-ids `curl -s http://169.254.169.254/latest/meta-data/instance-id` --query 'Reservations[].Instances[].{Name:Tags[?Key==`Name`].Value}' --output text | awk '{print $2}'
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme