I am currently creating a S3 multipartupload program where the client side ideally only makes one request to the server side to complete this. This means the server side
- Creates the MultipartUpload
- creates the upload IDs as presigned urls
- creates the CompleteMultipartUpload/AbortMultipartUpload as presigned urls
- returns all those URLs to the client side for the client to make all those requests.
Currently I have everything working but getting the CompleteMutlipartUpload/Abort presigned URL working. I get the error: <Response [403]> The request signature we calculated does not match the signature you provided. Check your key and signing method.
My code looks something like this
Server side in Go:
completeInput := &s3.CompleteMultipartUploadInput{
Bucket: aws.String(BUCKET),
Key: aws.String(FILE),
UploadId: uploadId,
MultipartUpload: &s3.CompletedMultipartUpload{
Parts: completedParts,
},
}
resp, _ := svc.CompleteMultipartUploadRequest(completeInput)
// Note that calling resp.Send() works and uploads the file correctly
completeUrl, _ := resp.Presign(15 * time.Minute)
Then I call the Client side code in Python:
// Note I also upload code from this environment so I believe my credentials are good to go
def complete(completeUrl):
complete = requests.put(completeUrl)