Amazon S3

S3 bucket pre-signed urls

By Abhinay Durishetty
6 mins read
A presigned URL is a special URL that provides temporary access to resources in an Amazon S3 bucket, allowing users to access private objects without AWS security credentials.


Key Characteristics:

  • Temporary Access: Presigned URLs are valid only for a specific duration. The default is 3600 seconds (1 hour), but you can specify a custom value, up to a maximum of 7 days (604800 seconds) for URLs using the GET method.

  • Access Private Objects: Even if your bucket is private, presigned URLs allow the specified operations on the object. This means you don't have to make the object public to share it.

  • Flexible Permissions: Presigned URLs can be generated for various operations including GET, PUT, DELETE, etc.


Use Cases:

  • Private Sharing: Share a document or media file without altering its permissions or moving it from a private bucket.
  • Client-side Uploads: Allow trusted clients to directly upload to S3 without intermediary servi- ces.
  • Timed Access: Grant temporary access for scenarios like one-time downloads.
While AWS SDKs are a more common way to generate presigned URLs, you can also do it through the AWS Management Console

  • Open the Amazon S3 console
  • Navigate to the desired bucket and then to the object you want to share and select "Share with a presigned URL".
How to generate Presigned URL for S3 object?
A window will open allowing you to specify the expiration time for the URL. Specify Duration for the expiry and click "Create presigned URL"
You can then copy this URL and share it.
Paste this URL in the browser to verify.
After the expiration time of the URL, you won't be able to access the object in the bucket, and you will receive the following error.