AWS CLI는 두 가지 버전으로 제공된다.

AWS CLI 활용경험

  1. git commit&push를 하면 github action을 통해 react-app build후 s3로 배포하는 작업을 위해 사용
  2. docker image생성 후 ecr에 등록하기 위해 사용

MacOS에 AWS CLI 설치하기

# 최신 버전 설치
$ curl "<https://awscli.amazonaws.com/AWSCLIV2.pkg>" -o "AWSCLIV2.pkg"
$ sudo installer -pkg AWSCLIV2.pkg -target /

# 원하는 특정 버전 설치
$ curl "<https://awscli.amazonaws.com/AWSCLIV2-2.0.30.pkg>" -o "AWSCLIV2.pkg"
$ sudo installer -pkg AWSCLIV2.pkg -target /

설치 확인하기

# cli 설치 위치 확인
$ which aws

# cli version확인
$ aws --version

AWS CLI 제거하기

To uninstall the AWS CLI version 2, run the following commands, substituting the paths you used to install.

  1. Find the folder that contains the symlinks to the main program and the completer.
$ **which aws***/usr/local/bin*/aws