特定のタグを持つEC2 インスタンスのPrivateDnsNameを一覧。

More than 1 year has passed since last update.

jq と aws command でのサンプルで。

bash
aws ec2 describe-instances --filters Name=tag:TagName,Values=TagValue | jq -M -r '.["Reservations"][]["Instances"][]["PrivateDnsName"]'
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account log in.