The authorization mechanism you have provided is not supported...

0

Trying to add S3 support to one of our systems. I'm not able to use one of your SDK so I'm doing this through just regular POST processing. I've built up my web page and thought I had it right but I keep getting this error and can't get past it. This is what I'm getting back from amazon web server. (btw... I hope I have all the terminology straight...)

Content-Disposition: form-data; name="X-Amz-Credential"

<key stuff>/20190814/us-east-2/S3/awss4_request
---httpapi-2019-08-14-10.50.29.595
Content-Disposition: form-data; name="AWSAccessKeyId"

<Key stuff> ---httpapi-2019-08-14-10.50.29.595 Content-Disposition: form-data; name="x-amz-date"

20190814T105029Z
---httpapi-2019-08-14-10.50.29.595
Content-Disposition: form-data; name="x-amz-algorithm"

aws4-hmac-sha256
---httpapi-2019-08-14-10.50.29.595
Content-Disposition: form-data; name="key"

user/user1/${filename}
---httpapi-2019-08-14-10.50.29.595
Content-Disposition: form-data; name="acl"

public-read
---httpapi-2019-08-14-10.50.29.595
Content-Disposition: form-data; name="Policy"

<policy file> ---httpapi-2019-08-14-10.50.29.595 Content-Disposition: form-data; name="X-Amz-Signature" <signature>

---httpapi-2019-08-14-10.50.29.595
Content-Disposition: form-data; name="Signature"
<signature>

---httpapi-2019-08-14-10.50.29.595
Content-Disposition: form-data; name="file"; filename="/xxx/xxxx.pdf "
Content-Type: application/octet-stream
<file info>

I get the following message.
<Error><Code>InvalidRequest</Code><Message>The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.</Message><RequestId>497D50731822C357</RequestId><HostId>bRNPX3JjV1H3TaS0IFiMi36Mod3V0dzkz6HTUTuK92gExdryRLkOEKkIA+fVZpV/tMkUu/ixWPg=</HostId></Error>

I've tried using AWS4-HMAC-SHA256 in both caps and lower case. All the searches I've done point to old posts that are not relevant. Is there anything else that could be causing this error to be thrown?

warped6
질문됨 5년 전1822회 조회
3개 답변
0

Hi,
Not sure if this was a typo in your post, or possibly related to the issue..

/20190814/us-east-2/S3/awss4_request

"awss4"_request should be "aws4_request"

/20190814/us-east-2/S3/aws4_request

Hope this helps!
-randy

답변함 5년 전
0

Turns out it was the extra blank lines between the various sections but you are right about the AWSS4 bit! Thanks for that catch. Now onto my next problem.

warped6
답변함 5년 전
0

Turns out AWS didn't like the extra blank lines between sections.

warped6
답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠