목차

AWS CLI

설치

Configure/Profile

[default]
aws_access_key_id=AKIAIOSFODNN7EXAMPLE
aws_secret_access_key=EXAMPLEKEY

[user1]
aws_access_key_id=AKIAI44QH8DHBEXAMPLE
aws_secret_access_key=EXAMPLEKEY
[default]
region=ap-northeast-2
output=json

# 주의 profile 이 앞에 붙음
[profile user1]
region=ap-northeast-2
output=text

private IP 로 EC2 인스턴스 찾기

# <IP> 부분을 대치한다.
aws ec2 describe-instances --region ap-northeast-2 --filters Name=network-interface.addresses.private-ip-address,Values=<IP>
 
# Name tag만 출력
 aws ec2 describe-instances --region ap-northeast-2 --filters Name=network-interface.addresses.private-ip-address,Values=<IP> --output text | grep TAGS | grep Name

amazon/aws-cli

mesosphere/aws-cli

참고