Using boto for AWS S3 Buckets for Signature V4

后端 未结 4 2160
春和景丽
春和景丽 2020-12-06 10:56

I have a problem with using Python-Boto SDK for S3 Buckets for region Frankfurt. According to Amazon link this region will only support V4. This document explains how to ad

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-06 11:26

    I had the same issue using Boto. The region was Frankfurt and got errors about wrong regions. The solution for me was just to point a host (an URI got from this page http://docs.aws.amazon.com/general/latest/gr/rande.html) to 's3.eu-central-1.amazonaws.com' instead of default 's3.amazonaws.com'

    s3 = boto.s3.connect_to_region('eu-central-1',
                                   aws_access_key_id=accesskey,
                                   aws_secret_access_key=secretkey,
                                   host='s3.eu-central-1.amazonaws.com')
    

提交回复
热议问题