Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS S3 - Generate presigned URL using REST API

Is it possible to generate a presigned URL for an S3 object using the AWS REST API rather than the SDKs? I can't find the topic for this in the AWS REST API documentation.

like image 505
Jonathan Wareham Avatar asked Jun 18 '18 15:06

Jonathan Wareham


1 Answers

You won't find a REST endpoint for generating a presigned URL because that URL is generated entirely client-side. :) The python code used to generate those URLs can be found in the generate_presigned_url method of the signers.py in the botocore library.

You can verify the client-sidedness of the presigned-url generation in two ways:

  1. Grab a network traffic analyzer and compare the traffic of a bucket-list operation and a generate-presigned-url operation

  2. Generate a presigned-url for a non-existent bucket using invalid credentials and marvel as a totally non-fucntional presigned url is still happily generated for you

like image 94
Jason Rosendale Avatar answered Sep 22 '22 11:09

Jason Rosendale