Skip to content

Latest commit

 

History

History
43 lines (36 loc) · 759 Bytes

S3.md

File metadata and controls

43 lines (36 loc) · 759 Bytes

S3

aws cli

install

python3 -m pip install awscli

set env variables

cat > .env <<_EOF_
AWS_CA_BUNDLE=/path/to/root/ca_root.pem
AWS_ACCESS_KEY_ID=<id>
AWS_SECRET_ACCESS_KEY=<key>
_EOF_

export $(cat .env | xargs)

configure

aws configure set aws_access_key_id <id>
aws configure set aws_secret_access_key <key>

cat ~/.aws/credentials

list files

aws s3 ls s3://bucket-name/ \
     --endpoint-url=https://s3.url-address.ru \
     --ca-bundle /path/to/root/ca_root.pem \
     --no-verify-ssl

copy files

aws s3 cp s3://bucket-name/ ~/local/ \
   --recursive \
     --endpoint-url=https://s3.url-address.ru \
     --ca-bundle /path/to/root/ca_root.pem \
     --no-verify-ssl