- Local dir to remote bucket sync
- Local dir to remote bucket copy with gzip content encoding header
- Remote to remote bucket copy
$ aws s3 sync \
--dryrun \
--region REGION_NAME \
--delete \
/path/to/files/ \
s3://BUCKET_NAME/path/to/dest
$ aws s3 cp \
--dryrun \
--region REGION_NAME \
--recursive \
--content-encoding 'gzip' \
/path/to/files/ \
s3://BUCKET_NAME/path/to/dest
$ aws s3 cp \
--dryrun \
--region REGION_NAME \
--recursive \
s3://BUCKET_NAME_SOURCE/path/to/source \
s3://BUCKET_NAME_TARGET/path/to/dest
CMIIW I think it will take the access and secret key from your
awscli credential config
which you can look into in~/.aws/credentials
, if you have multiple profile you could add--profile YourProfileAlias