- ubuntu
- Install pip3 & awscli
sudo apt-get install python3-pip
sudo pip3 install awscli
- get access key & secret key
- open IAM
- choose user has S3 access permissions like "AmazonS3FullAccess"
- open security credencials tab
- create access key
- copy access key id & secret key
- set variables
export AWS_ACCESS_KEY_ID=hoge
export AWS_SECRET_ACCESS_KEY=fuga
- make directory (if needed) & copy files
aws s3 sync s3://{bucket-name} .
download: s3://{bucket-name}/vertica-9.1.1-0.x86_64.RHEL6.rpm to ./vertica-9.1.1-0.x86_64.RHEL6.rpm
download: s3://{bucket-name}/vertica-console-9.1.1-0.x86_64.RHEL6.rpm to ./vertica-console-9.1.1-0.x8
6_64.RHEL6.rpm
-
delete access key if it temporary use.
-
additional
"aws s3 sync" can copy files from ec2 to s3 with same way. Following command makes copying all files in current folder to S3 bucket.
aws s3 sync . s3://{bucket-name}