AWS Cli sync with non DNS compatible bucket

荒凉一梦 提交于 2019-12-10 21:46:43

问题


Is there any way to use AWS command line to sync a local folder with a bucket that contains periods '.'?

If I do this:

aws s3 sync local_folder/ s3://files.domain.com/backup

I get this error:

fatal error: Bucket named files.domain.com is not DNS compatible. Virtual hosted-style addressing cannot be used. The addressing style can be configured by removing the addressing_style value or setting that value to 'path' or 'auto' in the AWS Config file or in the botocore.client.Config object.

I already tried removing or changing the addressing_style value in the AWS config, but didn't work. I have no idea how to change on botocore.

AWS Config

[default]
output = json
region = us-west-1
s3 =
  max_concurrent_requests = 100
  max_queue_size = 10000
  multipart_threshold = 64MB
  multipart_chunksize = 16MB
  use_accelerate_endpoint = true

回答1:


It seems I found the problem.

use_accelerate_endpoint = true

Transfer acceleration is not supported for buckets with periods (.) in their names: Amazon S3 Transfer Acceleration.

This means that use_accelerate_endpoint must be removed or set to false. Otherwise, it won't work and will throw that error, making you think it can work with the right settings, when in fact you need to remove the flag.



来源:https://stackoverflow.com/questions/41683589/aws-cli-sync-with-non-dns-compatible-bucket

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!