AWS in 1 Min · Episode 97

Amazon S3 presigned URLs explained

A temporary key to one file. Watch the one-minute video, then read the details.

David Gomez1:16 video · 3 min read

"To share a private file, make the bucket public." Please don't. A public bucket exposes everything in it, not just the one file you meant to share, and it's one of the most common causes of cloud data leaks. Amazon S3 has a narrower tool for this job: the presigned URL.

What a presigned URL is

A presigned URL is an ordinary HTTPS link with a signature in its query string. It grants access to one object, for one action (for example GET to download or PUT to upload), until an expiry time. The person who uses it needs no AWS account and no credentials of their own. The bucket stays private.

Your application creates the link with its own credentials, usually through an AWS SDK. Creating it makes no call to AWS: the SDK simply signs the request details (bucket, object key, method, expiry) with the signer's keys.

Whose permissions does it use?

The link can do exactly what its signer can do, never more. If the role that signed it lacks s3:GetObject on that object, the link returns 403 Forbidden. That makes it important to sign with a narrow role (see least privilege).

The link also dies with the signer's credentials:

  • Signed with an IAM user's long-term keys (Signature Version 4): valid for up to 7 days.
  • Signed with temporary credentials (an IAM role, an EC2 instance profile, an ECS task role, STS AssumeRole): it stops working when that session ends, even if you asked for a longer expiry.
  • In the S3 console you can pick 1 minute to 12 hours; from the CLI or SDKs, up to 7 days.

A common mistake: a Lambda function signs a link "valid for 7 days", and users complain it breaks after an hour. The function's role session expired, and the link went with it.

Treat it like a key

AWS describes presigned URLs as bearer tokens: anyone who has the link can use it, as many times as they like, until it expires. So:

  • Keep expiry short, minutes rather than days, when you can.
  • Don't paste links into chat tools, tickets or logs.
  • Use bucket-policy conditions such as s3:signatureAge to reject old signatures, and aws:SourceIp or VPC endpoint conditions to limit the network path.

Uploads straight to S3

Presigned URLs work for uploads too. Your backend checks who the user is, signs a PUT URL for a key it chooses (for example uploads/<user-id>/<uuid>.pdf), and the browser sends the file directly to S3. Large files never pass through your servers, so you don't pay to proxy them or size servers for them. Pick the key yourself: if a user can choose it, they can overwrite another object with the same name. If you need to cap file size, a presigned POST with a policy lets you set conditions such as a content-length range.

Where AI fits

AI apps constantly take files from users: contracts to summarize, invoices to extract, images to describe. A clean pattern is: presigned PUT for the upload, then an S3 event notification that triggers a Lambda function, which sends the document to a model in Amazon Bedrock and stores the result. The user never gets AWS credentials, your API never handles the bytes, and each upload lands in a predictable, per-user location you can secure and clean up.

Quick recap

  • A presigned URL grants time-limited access to one object without making the bucket public.
  • It carries the signer's permissions and expires with the signer's credentials (max 7 days).
  • Anyone holding it can use it: keep it short-lived and out of logs.
  • For uploads, the browser sends files straight to S3, which suits AI document pipelines.
AWS in 1 Min #97 · 1:16

Need an AWS expert on your team?

I'm David, an AWS expert and fractional cloud consultant. I work alongside your team to run your cloud and infrastructure: architecture, security, cost and day-to-day operations. You get senior AWS experience when you need it, without the cost of a full-time hire.

  • Architecture reviews and a clear plan for what to fix first
  • Security hardening: IAM, networking, audits
  • Lower AWS bills without slowing your team down
  • Hands-on help with AI workloads on AWS