You are not authorized to perform this operation

匿名 (未验证) 提交于 2019-12-03 02:38:01

问题:

i use aws to put a object and set the object public , but there is some errors so that i can't download successfully. errors like this:

回答1:

UnauthorizedAccess is not currently a documented error code in the standard (global) S3 documentation.

However, I did find a reference to it on the AWS help forum. If you are using AWS China (Beijing) this is likely the explanation.

In accordance with Chinese law and regulations, if you use AWS (China) to host a website providing non-commercial Internet information services, you must undertake filing procedures for a non-commercial website (an “ICP Recordal”) at the relevant government authority. If you use AWS (China) to host a website providing commercial Internet information services, you must obtain a value-added telecommunications license for a commercial website (an “ICP License”) from the relevant government authority. We may require you to produce your ICP Recordal or ICP License, as applicable, before you use AWS (China) to host public content.

https://forums.aws.amazon.com/thread.jspa?messageID=689267&#689267

The following is a Google translation from the actual Chinese documentation.

The following Amazon S3 features are either unavailable in the Beijing region or require an ICP license:

Amazon S3 objects honor anonymous GET requests only if the object owner’s Amazon AWS account is associated with a valid ICP license. As a result, hosting a static website from an Amazon S3 bucket and using pre-signed URLs require an ICP license.

http://docs.amazonaws.cn/aws/latest/userguide/s3.html (translated)

This implies that may only be able to access your content using the Authorization: header mechanism permitted in Signature Version 4, since the older Signature Version 2 is also not supported in China, or any other S3 region that launched in 2014 or later.



回答2:

I met the same "UnauthorizedAccess" error recently in AWS (China).

As Michael already mentioned. "The following Amazon S3 features are either unavailable in the Beijing region or require an ICP license:

Amazon S3 objects honor anonymous GET requests only if the object owner’s Amazon AWS account is associated with a valid ICP license. As a result, hosting a static website from an Amazon S3 bucket and using pre-signed URLs require an ICP license."

After associated our ICP license with the AWS account, ports 80, 443, 8080 open and s3 pre-signed URLs work.

AWS CN FAQ: https://www.amazonaws.cn/en/about-aws/china/faqs/#do-i-need-icp-recordal Another guide I found: https://fastretailing.github.io/blog/2015/09/29/AWS-ChinaBeijing-Region-Tips.html



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!