2017-01-16 23 views
2

有什麼方法可以使用AWS命令行將本地文件夾與包含句點'。'的存儲桶同步?AWS Cli與非DNS兼容存儲桶同步

如果我這樣做:

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

我得到這個錯誤:

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。

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 
+0

存儲桶位於us-west-1 – rlcabral

+0

我已編輯該問題以添加當前AWS配置。 – rlcabral

+0

即使提供'region'信息,它是否會引發異常?你也可以將'addressing_style = path'和region一起添加到配置中。只需猜測,將「--no-verify-ssl true」添加到命令中。 – franklinsijo

回答

1

看來我發現這個問題。

use_accelerate_endpoint = true 

轉移加速不支持水桶時期在他們的名字(。):Amazon S3 Transfer Acceleration

這意味着use_accelerate_endpoint必須被刪除或設置爲false。否則,它將無法工作,並會拋出該錯誤,讓您認爲它可以使用正確的設置,而實際上您需要刪除該標誌。