AWS Infra

[ AWS ] Linux AWS S3 설치

Pydole 2021. 11. 1. 23:13

 

 

 

1. AWS Cli 설치방법

 

https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html

 

Installing, updating, and uninstalling the AWS CLI version 2 on Linux - AWS Command Line Interface

AWS CLI versions 1 and 2 use the same aws command name. If you have both versions installed, your computer uses the first one found in your search path. If you previously installed AWS CLI version 1, we recommend that you do one of the following to use AWS

docs.aws.amazon.com

 

[~]$ aws --version
aws-cli/2.3.2 Python/3.8.8 Linux/4.14.248-189.473.amzn2.x86_64 exe/x86_64.amzn.2 prompt/off

 

 


 

IAM 사용자 생성

 

 

 

 

 

 


 

aws cli 연결

 

[ ~]$ aws configure

 

AWS Access Key ID [None]: xxxxx
AWS Secret Access Key [None]: xxxx
Default region name [None]: ap-northeast-2         ← 리전명
Default output format [None]:

 


 

1. 조회

 

[~ ]$ aws s3 ls s3://[버킷명]
                           PRE mytest

 

 

 

2. 업로드

 

[ ~ ]$ aws s3 cp test.txt s3://[버킷명]/mytest/
upload: ./test.txt to s3://[버킷명]/mytest/test.txt