Hello World

Be Happy!

Upload file to S3 with AWS CLI


1. Create AWS USER


2. Add User
2-1. S3 Access Permission

2-2. Create access key


3. Install AWS CLI
$ brew update
$ brew install awscli
$ brew list awscli
/usr/local/Cellar/awscli/1.16.260/bin/aws
/usr/local/Cellar/awscli/1.16.260/bin/aws_completer
/usr/local/Cellar/awscli/1.16.260/etc/bash_completion.d/aws_bash_completer
/usr/local/Cellar/awscli/1.16.260/libexec/bin/ (42 files)
/usr/local/Cellar/awscli/1.16.260/libexec/lib/ (4751 files)
/usr/local/Cellar/awscli/1.16.260/libexec/.Python
/usr/local/Cellar/awscli/1.16.260/share/awscli/ (2903 files)
/usr/local/Cellar/awscli/1.16.260/share/zsh/ (2 files)
Rheeui-MacBook-Pro:encoding rhee$ aws configure
AWS Access Key ID [****************332A]: 
AWS Secret Access Key [****************EPxV]: 
Default region name [us-west-1]: 
Default output format [None]: 
Rheeui-MacBook-Pro:encoding rhee$ s3 ls
-bash: s3: command not found
Rheeui-MacBook-Pro:encoding rhee$ aws s3 ls

An error occurred (AccessDenied) when calling the ListBuckets operation: Access Denied
Rheeui-MacBook-Pro:encoding rhee$ aws s3 ls
2019-03-04 07:27:32 xxxx
2015-11-24 23:37:10 xx-ftp
2019-10-23 14:18:11 xxx-xxx

4. CP file to S3
$ touch test.txt
$ echo "hello world" >> test.txt
$ aws s3 cp test.txt s3://BUCKET-NAME/test2.txt
$ aws s3 ls xxxx
2019-10-23 14:53:27         24 test2.txt
$ aws s3 cp ./m3u8/z6y0b49xecmx8567ncd6spea42ig s3://BUCKET-NAME/z6y0b49xecmx8567ncd6spea42ig --recursive

#upload (3) #rails-encoding (8) #cloudfront (2) #s3 (4) #aws (11) #aws-cli (3)
List