본문 바로가기

리눅스

[draft] 맥(Mac)에서 AWS CLI를 최신 버전으로 설치하는 방법

맥(Mac)에서 AWS CLI를 최신 버전으로 설치하는 방법

AWS Command Line Interface(AWS CLI) 설치

curl -s "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
> sudo installer -pkg AWSCLIV2.pkg -target /
Password:
installer: Package name is AWS Command Line Interface
installer: Installing at base path /
installer: The install was successful.

AWS CLI 경로 확인

which aws
> which aws
/usr/local/bin/aws

AWS CLI 버전 정보 확인

aws --version
> aws --version
aws-cli/2.7.17 Python/3.9.11 Darwin/20.6.0 exe/x86_64 prompt/off

액세스 키(AWS Access Key)와 비밀 액세스 키(AWS Secret Access Key)를 등록합니다.

aws configure
> aws configure
AWS Access Key ID [None]: AKIAT
AWS Secret Access Key [None]: lk0ja
Default region name [None]: ap-northeast-2
Default output format [None]: json

액세스 키(AWS Access Key)와 비밀 액세스 키(AWS Secret Access Key)의 목록를 확인합니다.

aws configure list
> aws configure list
      Name                    Value             Type    Location
      ----                    -----             ----    --------
   profile                <not set>             None    None
access_key     ****************XD5I shared-credentials-file
secret_key     ****************RjjR shared-credentials-file
    region           ap-northeast-2      config-file    ~/.aws/config

AWS 액세스 키의 값(정보)을 출력

aws configure get aws_access_key_id

AWS 비밀 액세스 키의 값(정보)을 출력

aws configure get aws_secret_access_key

AWS 계정의 호출자 식별 정보를 출력

aws sts get-caller-identity

 

aws-cli.pdf
0.41MB

 

참고URL

- 변군이글루 : https://sangchul.kr/190

- https://docs.aws.amazon.com/ko_kr/cli/latest/userguide/getting-started-install.html