본문으로 건너뛰기

Object Storage Client Tool - aws_cli

aws_cli 설치 및 기본 사용 가이드

AWS CLI(Amazon Web Services Command Line Interface)는 AWS 서비스 리소스를 명령줄 환경에서 제어, 자동화, 관리할 수 있는 CLI 도구입니다.
iwinv 오브젝트 스토리지는 AWS S3 호환 API를 지원하므로, AWS CLI를 사용해 iwinv Object Storage의 버킷과 오브젝트를 명령줄에서 손쉽게 관리하고 자동화할 수 있습니다.

해당 메뉴얼은 Object Storage 지원 Tool 중 하나인 aws_cli설치방법기본 사용법에 대해 기술합니다.

운영체제별 설치 및 설정

Linux

aws_cli 다운로드

root@iwinv:~# curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 63.0M 100 63.0M 0 0 334M 0 --:--:-- --:--:-- --:--:-- 335M

압축 해제

root@iwinv:~# unzip awscliv2.zip
Archive: awscliv2.zip
creating: aws/
creating: aws/dist/
...
inflating: aws/dist/awscli/topics/return-codes.rst
inflating: aws/dist/awscli/topics/config-vars.rst

설치 및 버전 확인

root@iwinv:~# ./aws/install
You can now run: /usr/local/bin/aws --version

root@iwinv:~# aws --version
aws-cli/2.27.36 Python/3.13.3 Linux/6.8.0-49-generic exe/x86_64.ubuntu.24

aws cli 구성

root@iwinv:~# aws configure --endpoint-url https://kr.object.iwinv.kr --profile [username]
AWS Access Key ID [None]: [Access Key]
AWS Secret Access Key [None]: [Secret Key]
Default region name [None]: [Enter]
Default output format [None]: [Enter]

Windows

awscliv2 다운로드

아래의 링크에서 Windows용 AWS CLI MSI설치관리자 다운로드
https://docs.aws.amazon.com/ko_kr/cli/latest/userguide/getting-started-install.html

설치 및 버전 확인

a. 설치 관리자 실행
설치 관리자 실행

b. 라이센스 동의
라이센스 동의

c. 설치경로 설정
설치경로 설정

d. 설치 진행
설치 진행

e. 설치 확인
설치 확인

f. 버전 확인

C:\Users\iwinv> aws --version

aws cli 구성

C:\Users\iwinv> aws configure --endpoint-url https://kr.object.iwinv.kr --profile [username]
AWS Access Key ID [None]: [Access Key]
AWS Secret Access Key [None]: [Secret Key]
Default region name [None]: [Enter]
Default output format [None]: [Enter]

기본 사용법

a. 리스트 확인

aws s3 ls

# Linux
root@iwinv:~# aws s3 ls s3://[bucket] --endpoint-url https://kr.object.iwinv.kr --profile [username]

# Windows
C:\Users\iwinv> aws s3 ls s3://[bucket] --endpoint-url https://kr.object.iwinv.kr --profile [username]
* [bucket] : 생성된 버킷명, [username] : 위에서 구성한 사용자명

b. 업로드

aws s3 cp

# Linux
root@iwinv:~# aws s3 cp [upload_file] s3://[bucket]/[upload_path] --endpoint-url https://kr.object.iwinv.kr --profile [username]

# Windows
C:\Users\iwinv> aws s3 cp [upload_file] s3://[bucket]/[upload_path] --endpoint-url https://kr.object.iwinv.kr --profile [username]

* local의 [upload_file]을 [bucket]의 [upload_path]에 업로드

c. 다운로드

aws s3 cp

# Linux
root@iwinv:~# aws s3 cp s3://[bucket]/[download_file] [download_path] --endpoint-url https://kr.object.iwinv.kr --profile [username]

# Windows
C:\Users\iwinv> aws s3 cp s3://[bucket]/[download_file] [download_path] --endpoint-url https://kr.object.iwinv.kr --profile [username]

d. 삭제

aws s3 rm

# Linux
root@iwinv:~# aws s3 rm s3://[bucket]/[file] --endpoint-url https://kr.object.iwinv.kr --profile [username]

# Windows
C:\Users\iwinv> aws s3 rm s3://[bucket]/[file] --endpoint-url https://kr.object.iwinv.kr --profile [username]