Join our Newsletter — 33% off our NHI Course
Home› Guides› Pre-Signed URLs for Beginners: Temporary Download Links and…
Guide Cloud Security

Pre-Signed URLs for Beginners: Temporary Download Links and How They Leak

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 1 December 2026 9 min read
On this page

A pre-signed URL is a web link that carries its own time-limited permission to read or upload one cloud file.

This guide is for developers, testers and anyone who shares files from cloud storage. You do not need deep cloud knowledge. If your app sends people download links to files, it may already use these links.

In short

  • A pre-signed URL lets someone fetch or upload a file without having their own cloud account.
  • It works like a bearer token: anyone who has the link can use it until it expires.
  • It acts with the permissions of the identity that signed it, often a robot account.
  • Links leak through logs, tickets, chat and code. Keep expiry short and treat the link like a secret.

What you will learn

  • Explain what a pre-signed URL is and why developers use them.
  • Describe whose permissions the link carries.
  • Spot the common places these links leak.
  • Choose safer settings: short expiry, narrow rights and a way to cut access.
Ticket link (pre-signed URL)
a link with a permission slip built into it.
Holder wins (bearer token)
whoever holds it can use it, no questions asked.
Signer (signing identity)
the account whose rights the link borrows.

What is a pre-signed URL?

Think of a cinema ticket. The ticket names one film and one time. Whoever holds it gets in, and nobody checks a name.

A pre-signed URL works the same way. AWS says a pre-signed link gives time-limited access to an object in Amazon S3 without changing the bucket's rules [1]. It can let someone download a file, or upload one without their own cloud keys [1].

Other clouds have the same idea under other names. The table lists them alphabetically.

Cloud storageName for the linkWhat the vendor says about holders
Amazon S3Presigned URLPresigned URLs are bearer tokens that grant access to whoever has them [1].
Azure StorageShared access signature (SAS)A leaked SAS can be used by anyone who obtains it [2].
Google Cloud StorageSigned URLAnyone who has the signed URL can use it while it is active, with or without an account [3].

Where the comparison stops working: a cinema ticket works once. AWS says a pre-signed URL can be used many times until it expires [1].

Why does it matter?

These links are easy to make and easy to copy. A link pasted in the wrong place can hand a private file to anyone who finds it.

If you write code that makes these links

What could happen: you set a long expiry "to be safe", and the link ends up in a public bug report.

Check this: how long do your links last, and where are they logged?

Next: Bearer Tokens for Beginners

If you manage cloud identities

What could happen: links are signed by a robot account that can read every file in the bucket.

Check this: the signing identity can only reach the files it needs to share.

Next: AWS IAM for Beginners

If you are new to security work

What could happen: a link that looks like a normal web address is shared in team chat and forwarded outside.

Check this: learn what these links look like so you can spot them.

Next: Cloud Storage Buckets for Beginners

What does it look like?

Here is a made-up link, split over lines so it is easier to read.

Example only. All values are made up.

https://example-bucket.s3.example.com/reports/EXAMPLE.pdf   (1)
?X-Amz-Credential=AKIAEXAMPLEFAKE/...                        (2)
&X-Amz-Date=20260101T000000Z                                 (3)
&X-Amz-Expires=604800                                        (4)
&X-Amz-Signature=0000FAKE0000                                 (5)
  1. The bucket and the one file the link opens.
  2. In a real file, this line would contain the key ID of the identity that signed the link.
  3. When the link was signed.
  4. How long it lasts, in seconds. 604800 seconds is seven days.
  5. The signature that proves the link was made by the signer and not changed.

Why this is risky: this link works for a week for anyone who has it. If it lands in a log or a ticket, nobody may notice.

The safer way: use the shortest expiry that still works, such as a few minutes, and make a fresh link each time.

How does it work?

  1. An app asks for a link. A user clicks "download report".
  2. The app signs a link. It uses the cloud credentials of its own identity, often a robot account. On AWS the link carries the permissions of the identity that made it, and no more [1].
  3. The user gets the link. The browser fetches the file straight from storage.
  4. Storage checks the link. It checks the signature and the expiry. It does not ask who the person is.
  5. The link expires. On AWS, a link also stops working early if the signing credential is revoked, deleted or turned off [1].
Diagram titled How a pre-signed link is made and where it leaks. On the left, an App box signs a link using a Robot account. An arrow leads to a Link box showing file, expiry and signature. An arrow leads right to Cloud storage, which checks only the signature and expiry. Below the Link box, three leak boxes show where copies often end up: logs, tickets and chat, and code. A note at the bottom says anyone holding a copy can use it until it expires.
Figure 1. Storage checks the link, not the person, so every copy of the link works.

How long can a link last? It depends on the cloud and the tool:

  • Amazon S3: up to seven days when made with the command line tools or SDKs [1]. The web console allows one minute to 12 hours [1]. A link signed with short-lived role credentials ends when those credentials end [1].
  • Azure Storage: Microsoft recommends near-term expiry times, so a leaked SAS is only valid for a short time [2].
  • Google Cloud Storage: the longest expiry is 604,800 seconds, which is seven days [3].

A worked example

This story is made up to show the idea.

Juno Lindahl builds a small invoicing app. Customers click a button and download their invoice from cloud storage through a pre-signed link.

To avoid "link expired" complaints, Juno sets every link to last seven days. The app also writes each full link to its logs for debugging.

Orla Brandt, who looks after the company's cloud accounts, reviews the logs. She finds hundreds of working invoice links. The logs are shared with an outside support firm.

She also checks the robot account that signs the links. It can read the whole bucket, including payroll files.

They fix it in three steps. Links now last five minutes, and a new one is made on every click. The logs keep the file name but cut off the signature part. The signing account can now read only the invoices folder.

Orla also adds a bucket rule that refuses links whose signature is older than ten minutes. AWS describes this kind of rule in its guidance [1].

Six weeks later a customer forwards an old invoice email to the wrong person. The link inside has long expired, so nothing is exposed.

Juno's lesson: the link is a key. Short life, narrow rights and careful logging keep a leaked copy from doing much harm.

Myths and mistakes

What people thinkWhat is true
Only the person I sent it to can use the link.Anyone who holds the link can use it until it expires[1][3].
A long random link is hard to find, so it is safe.A link is only as private as every place it gets copied to, such as logs, tickets and chat.
A link can only be used once.On AWS a link can be used many times until it expires[1].
I can delete one link to cancel it.Azure Storage does not track SAS tokens[2]. On AWS, revoking the signing credential ends its links[1].
Long expiry saves support calls.Long expiry gives a leaked link more time to be used. Make a fresh link on each click instead.

What can I do this week?

  • Find where your app makes these links and note the expiry it uses.
  • Search your logs for full signed links, and stop logging the signature part.
  • Check which identity signs the links and what else it can read.
  • Write down how you would cut off access if a link leaked today.

Checklist

  • I can explain a pre-signed URL as a link with a built-in permission.
  • I treat these links like passwords: never in tickets, chat or code.
  • Our links use the shortest expiry that works.
  • The signing identity can only reach the files it needs to share.
  • Our logs do not keep full signed links.
  • We know how to cut off access if a link leaks.

Common questions

Is a pre-signed URL the same as a "share link" in a file app?

They are close cousins. A share link is usually made by a person in a file-sharing app. A pre-signed URL is usually made by code, signed with a cloud identity's keys, for one stored file.

Why do developers use them at all?

They let a browser fetch or upload a file straight from storage. The other party does not need cloud keys or extra permissions[1], and the bucket can stay private.

How do I cancel a link that leaked?

Cut off the identity that signed it. On AWS, revoking or turning off the credential that signed it ends the link, and a bucket rule can refuse links over a set age[1]. Microsoft advises having a SAS revocation plan in place before you need it[2].

Does a leaked upload link matter?

Yes. Microsoft notes that the account is billed for any use through a SAS, so a leaked write link could be used to upload large files[2]. It could also let someone change or replace files within the link's rights.

Where next?

Ready for the detail? Read the practitioner guide: Public S3 Exposure Check. It shows how to find open buckets, risky policies and long-lived pre-signed links.

Also useful:

Related NHI Mgmt Group resources: Accidental Data Leaks for Beginners, Access and Refresh Tokens for Beginners and Non-Human Identities for Beginners.

Key terms

Pre-signed URL
A link with a built-in, time-limited permission to read or upload one stored file.
Bearer token
A credential that grants access to whoever holds it.
Shared access signature
Azure Storage's form of a signed link or token that grants limited, time-bound access.
Amazon S3
AWS object storage used to hold files, backups and application data.
Least privilege
Giving each person or system only the access it needs, and no more.

Sources and further reading

  1. Amazon Web Services, "Download and upload objects with presigned URLs", Amazon S3 User Guide. https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-presigned-url.html (accessed 1 Dec 2026).
  2. Microsoft, "Grant limited access to data with shared access signatures (SAS)", Microsoft Learn. https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview (accessed 1 Dec 2026).
  3. Google Cloud, "Signed URLs", Cloud Storage documentation. https://docs.cloud.google.com/storage/docs/access-control/signed-urls (accessed 1 Dec 2026).

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.