Skip to content

Instantly share code, notes, and snippets.

@valbeat
Created September 16, 2018 13:30
Show Gist options
  • Save valbeat/3822c33087cd11aa7be18901d4e11de2 to your computer and use it in GitHub Desktop.
Save valbeat/3822c33087cd11aa7be18901d4e11de2 to your computer and use it in GitHub Desktop.
EC2インスタンスのPublicDnsNameを一覧で表示するコマンド ref: https://qiita.com/valbeat/items/f73f94b5e738060fa60a
$ aws ec2 describe-instances --query 'Reservations[*].Instances[*].PublicDnsName' --output text
ec2-xxx-xxx-xxx-xxx.ap-northeast-1.compute.amazonaws.com
ec2-xxx-xxx-xxx-xxx.ap-northeast-1.compute.amazonaws.com
ec2-xxx-xxx-xxx-xxx.ap-northeast-1.compute.amazonaws.com
ec2-xxx-xxx-xxx-xxx.ap-northeast-1.compute.amazonaws.com
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment