I've been trying to make use of the presign URL to put a file into my private S3 bucket. But I kept receiving this error message
<Code>SignatureDoesNotMatch</Code>
<Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>
The presign URL was generated using this command
aws s3 presign s3://<bucket-name>/<file-name> --expires-in 300
But when I do a curl PUT request, the error occurred
curl -T "<file-name>" "<Generated presign url>"
Did some research saw people talking about adding the 'Content_Type' in the header when requesting for the presign URL, but the aws cli doesn't have that flag to include.
Is it possible to do a put request through aws cli??
AWS CLI doesn't support presigned PUT URL yet. You can easily generate one using Python Boto3 though. The documentation is here. If you want a presigned PUT, you just need to let ClientMethod
param be put_object
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With