AWS CLI

aws cli ์„ค์น˜

curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /

AWS ์•ก์„ธ์Šค ํ‚ค ์ƒ์„ฑ

aws cli setup command

aws configure

์ƒ์„ฑํ•œ ํ‚ค์™€ ๋‚ด์šฉ์„ ๋„ฃ๋Š”๋‹ค.

~/.aws/์— ํŒŒ์ผ์ด ์ƒ์„ฑ๋œ๋‹ค

vi ~/.aws/config

[smiley]
region = us-west-2
output = yaml

ํ˜น์‹œ ๋””ํดํŠธ๋กœ ๋˜๋ฉด ๊ทธ๊ฑธ ์‚ฌ์šฉํ•˜๋ฉด ๋œ๋‹ค.

vi ~/.aws/credentials

[smiley]
aws_access_key_id = access-key
aws_secret_access_key = your-secret

๊ธฐ๋ณธ ์œ ์ € ์„ค์ •

export AWS_PROFILE=smiley

ํ™•์ธ

aws help
aws command help
aws command subcommand help
aws ec2 describe-instances help

aws ec2 describe-instances  --region us-west-2 --query "Reservations[].Instances[].InstanceId"

Last updated