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
preguntada hace 5 años1825 visualizaciones
3 Respuestas
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

respondido hace 5 años
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
respondido hace 5 años
0

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

warped6
respondido hace 5 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas