AWS Cli与不兼容DNS的存储桶同步 [英] AWS Cli sync with non DNS compatible bucket

查看:124
本文介绍了AWS Cli与不兼容DNS的存储桶同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用AWS命令行将本地文件夹与包含句点."的存储桶同步?

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

如果我这样做:

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

我收到此错误:

严重错误:命名为files.domain.com的存储桶与DNS不兼容. 不能使用虚拟主机样式的寻址.寻址方式 可以通过删除addressing_style值或设置来配置 该值在AWS Config文件中或在 botocore.client.Config对象.

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.

我已经尝试在AWS配置中删除或更改addressing_style值,但是没有用.我不知道如何在botocore上进行更改.

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配置

[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

推荐答案

似乎我找到了问题.

use_accelerate_endpoint = true

名称中带有句点(.)的存储桶不支持传输加速: Amazon S3传输加速.

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

这意味着必须删除use_accelerate_endpoint或将其设置为false.否则,它将无法正常工作,并会抛出该错误,使您认为它可以在正确的设置下工作,而实际上您需要删除该标志.

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.

这篇关于AWS Cli与不兼容DNS的存储桶同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆