網頁

2023/5/10

AWS S3 bucket access point Object URL InvalidRequest - Please use Signature Version 4

在瀏覽器點選AWS S3 bucket access point的object的[Object URL]出現錯誤InvalidRequest,錯誤訊息The authorization mechanism you have provided is not supported. Please use Signature Version 4.


<Error>
  <Code>InvalidRequest</Code>
  <Message>The authorization mechanism you have provided is not supported. Please use Signature Version 4.</Message>
  <RequestId>6KJ99XB8GV23M2NJ</RequestId>
  <HostId>GCX6M3C32cMTuKD8pmkee7TzEUVG4StbtLstvQ5+fclfkJX/xxGJDPtc3bDDo+TPWnd9ylAd6aA=</HostId>
</Error>

問題原因在於使用access point的object的Object URL相當於以REST API的方式讀取object,而已REST API存取access point時必須使用AWS Signature Version 4的方式驗證,即在Request Header設定AuthorizationCredentialSignedHeadersSignedHeaders;而在瀏覽器開啟access point object的Object URL即未設定以上request header因此出現InvalidRequest錯誤。


沒有留言:

張貼留言