On S3 document, there is createPresignedPost and getSignedUrl.
On getSignedUrl:
Note: Not all operation parameters are supported when using pre-signed URLs. Certain parameters, such as SSECustomerKey, ACL, Expires, ContentLength, or Tagging must be provided as headers when sending a request. If you are using pre-signed URLs to upload from a browser and need to use these fields, see createPresignedPost().
Is createPresignedPost simply more customizable version of getSignedUrl? Is it doing the same thing underneath?
If you want to restrict users from uploading files beyond certain size, you should be using createPresignedPost
, and specify ContentLength
with getSignedUrl, there is no restricting object size and user can potentially upload a 5TB object (current object limit) to s3
Note that if you can specify ContentLength in params when calling getSignedUrl('putObject',params, callback) you will be thrown
Presigning post data encountered an error { UnexpectedParameter: ContentLength is not supported in pre-signed URLs.
There is an issue on this subject