gpt4 book ai didi

amazon-web-services - 为什么在 AWS CLI 中使用预签名 URL 时需要指定区域?

转载 作者:行者123 更新时间:2023-12-04 14:07:47 25 4
gpt4 key购买 nike

当我使用命令 aws s3 presign s3://my_bucket/my_image.png没有指定区域,我得到一个 URL,将我重定向到<Message>The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.</Message> 以后,如果我使用 aws s3 presign s3://my_bucket/my_image.png --region us-east-1然后它正确显示图像,但为什么是--region us-east-1需要工作?

最佳答案

因为预签名的 S3 url 使用 sig4签名,这需要区域。来自 docs :

The signing key is scoped to a specific Region and service, and it never expires.


此外,来自 CLI docs :

For sigv4 requests the region needs to be configured explicitly.

关于amazon-web-services - 为什么在 AWS CLI 中使用预签名 URL 时需要指定区域?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67090894/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com