且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

AWS CLI S3调用HeadObject操作时发生客户端错误(403):禁止

更新时间:2022-11-06 20:18:17

我知道了.我在创建EC2实例的云形成模板中出错.结果,尝试访问上述代码部署存储桶的EC2实例位于不同的区域(不是us-west-2).似乎存储桶(由Amazon拥有)上的访问策略仅允许从它们所属的区域进行访问. 当我修复模板中的错误时(错误的参数映射),错误消失了

I figured it out. I had an error in my cloud formation template that was creating the EC2 instances. As a result, the EC2 instances that were trying to access the above code deploy buckets, were in different regions (not us-west-2). It seems like the access policies on the buckets (owned by Amazon) only allow access from the region they belong in. When I fixed the error in my template (it was wrong parameter map), the error disappeared