Skip to content

Instantly share code, notes, and snippets.

@tjinjin
Last active May 16, 2018 01:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tjinjin/bbc3da309ec978cef37c4617fa2b7945 to your computer and use it in GitHub Desktop.
Save tjinjin/bbc3da309ec978cef37c4617fa2b7945 to your computer and use it in GitHub Desktop.
AWSのよく使うコマンド
## EC2のインスタンス一覧が欲しい
export AWS_PROFILE=hoge
export AWS_REGION=ap-northeast-1
aws --output table ec2 describe-instances --region $AWS_REGION --profile $AWS_PROFILE \
--query 'Reservations[].Instances[].[PrivateIpAddress,Tags[?Key==`Name`].Value|[0],InstanceId]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment