Skip to content

Instantly share code, notes, and snippets.

@inokappa
Created May 14, 2016 15:42
Show Gist options
  • Save inokappa/d25754f69a736e500aa6ff855870b528 to your computer and use it in GitHub Desktop.
Save inokappa/d25754f69a736e500aa6ff855870b528 to your computer and use it in GitHub Desktop.
AWS CLI memo

aws ec2 describe-instances

インスタンスの状態が Running の Public DNS を取得

  • run
aws ec2 describe-instances \
  --filters 'Name=instance-state-name,Values=running' \
  --query 'Reservations[].Instances[].PublicDnsName[]' \
  --output text
  • output
ec2-xx-xxx-xx-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