Platform/AWS

AWS - CLI를 이용한 S3에 데이터 복사

wave35 2023. 3. 25. 21:20

 

awscli 설치

$ sudo apt update

$ sudo apt install awscli

$ aws --version 

 

awscli 접속정보 설정

$ aws configure

내보안자격증명에서 AccessKeyID, AccessKeyPWD 입력

리전은 ap-northeast-2

Output type은 Json

확인

$ aws configure list

 

데이터 카피할 버킷생성

$ aws s3 mb s3://dg-s3-demo

 

해당 URL에서 샘플데이터 

https://registry.opendata.aws/

$ aws s3 ls s3://nyc-tlc/trip\ data/

$ aws s3 cp s3://nyc-tlc/trip\ data/ s3://dg-s3-demo/ --recursive

 

 

AWS CLI에서 S3명령어 참조 : 

https://docs.aws.amazon.com/ko_kr/cli/latest/userguide/cli-services-s3-commands.html