Jiew Meng
Jiew Meng

Reputation: 88337

S3 SignedURL UploadPart fails with SignatureDoesNotMatch

I am trying to upload files using multipart upload. https://sandyghai.github.io/AWS-S3-Multipart-Upload-Using-Presigned-Url/

So far on my backend I got the signed URL like:

s3.getSignedUrl('uploadPart', {
    Bucket: ...,
    Key: ...,
    Expires: 60 * 60 * 2, // Expires in 2h
    UploadId: uploadId,
    PartNumber: 1
})

I split my files into 2 using bash

split -b 50000000 test.mp4

I tried to upload using Postman with the URL provided and passing my part like

I also tried using POST method. And adding content type but still got mismatch signature

enter image description here

Upvotes: 1

Views: 527

Answers (1)

Jiew Meng
Jiew Meng

Reputation: 88337

Turns out I need to set the signature version to 4

const s3 = new AWS.S3({ signatureVersion: 'v4' });

Upvotes: 2

Related Questions