AWS S3 Presigned URL upload image with postman

amazon s3postman

I need to upload a file to S3 with postman for testing. I have a generated presigned URL from S3.

But I don't know how to configure postman correctly for doing this PUT request to my generated presigned URL.

The response on postman with malformed headers is:

<Code>SignatureDoesNotMatch</Code>
<Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>

the params for the presigned request:

const params = {
  Bucket: 'ss-files-dev',
  Key: 'dansero.jpg',
  ContentType: 'image/jpeg',
  Expires: 100
};

I get the URL, then enter it in postman, with PUT request, but the headers are not complete?
1. if I add content-type on header, there is no response from server
2. in body for the request Im attaching file as "binary"

postmanConfig

How to do my PUT request from postman?, thanks

Best Answer

For me, Postman added hidden headers. If I remove the Content-Type header, the Put worked as expected.

Related Topic