Share an object with a presigned URL

Give someone time-limited access to one object without a key, with a presigned URL.

Last updated 18 November 2026View as Markdown

A presigned URL grants access to one object until it expires. Replace example-uploads with your bucket's name and report.pdf with the object's key.

Prerequisites

  • Permission for s3:GetObject on the object (s3:GetObjectVersion for an older version), or s3:PutObject for an upload URL. The URL can do no more than the key or user that signs it.

Create the URL

Not available in Console. The console's **Download** uses such a URL for you but does not show it.

The answer is { url, expiresInSeconds }: a URL valid for 900 seconds (15 minutes) that downloads the object. upload-url (s3:PutObject) answers a URL to PUT one object, with the Content-Type header it must carry, also valid 15 minutes.

With an S3 client you choose the lifetime, up to 7 days (604800 seconds):

aws --profile dcloud s3 presign s3://example-uploads/report.pdf --expires-in 3600

Result

The URL works until it expires, then answers AccessDenied "Request has expired". A URL you presigned with an S3 client stops working at once when you delete the access key that signed it. The URL from download-url makes the browser save the object as a file. A browser on another site that loads the URL from a script needs a CORS rule on the bucket (see Let a web page use the bucket).

Did this page help you?