The five parts of a presigned link, from the bucket and file name to the signature, with what each one reveals

There are two safe ways to share a file from a bucket. Use a public file when anyone may read it, for as long as it exists. Use a presigned link when one person or one task should read it, for a limited time. Never hand over an access key to share a file: a key reaches every file it can reach until someone deletes it, while a link does one thing to one file and then expires.

The decision table

You want toUseExpiry we'd setWhy
Serve site images, downloads, scriptsPublic bucketNoneStable address that caches well, and pages on other sites can fetch it
Let a signed-in customer download an invoicePresigned GET, made on click15 minutesYour app checks who is asking, every time
Send a colleague a file by chat or emailPresigned GET1 to 7 daysNo account needed, and it ends by itself
Take a file from someone outsidePresigned PUT15 to 30 minutesThey get one file name, not a key
Give a link that lasts longer than 7 daysA route in your app that signs on click15 minutes per click7 days is the ceiling, so the app must renew it
Give a partner regular accessA read-only key for one bucketUntil you delete itA real credential is right here. Links would need constant reissuing

The expiry values are our judgement, not a standard. Short for anything your app can reissue, longer only where a person has to act on the link.

What each option exposes

Public filePresigned linkAccess key
Who can use itAnyone with the addressAnyone with the linkAnyone with the ID and secret
ReachesEvery file in that bucket, if the name is known or guessedOne file, one methodEvery bucket and file the key allows
EndsWhen you switch Public off or delete the fileAt expiry, or when the signing key is deletedWhen you delete the key
RevealsBucket address and file pathBucket, file path, access key ID, date, regionEverything; it is the credential
Secret in the URLNone neededNo, only a signature made with itNot applicable

AWS's own documentation calls presigned URLs bearer tokens, and that's the right mental model: whoever holds the link can use it, as many times as they like until expiry. So links turn up in the places URLs usually land: browser history, proxy logs, chat previews, and forwarded emails. Keep them out of logs where you can, and don't put a customer's name or anything else private in the file path, because the path is readable in the link.

On tport.space, public is a setting on the whole bucket and object-level ACLs aren't supported, so keep public and private files in separate buckets. On the live service, checked on 8 November 2026, a public host listed nothing, with / returning 404 when there's no index.html, but a file with a guessable name is still readable. Use unguessable names if that matters, or a presigned link.

Expiry limits

How the link is madeDefaultLongest
AWS CLI, aws s3 presign3,600 s (1 hour)604,800 s (7 days)
AWS SDKs, IAM user keys, Signature V4Varies by SDK; 3,600 s in boto37 days
Amazon S3 consoleSet when you create it12 hours (minimum 1 minute)
AWS temporary credentialsEnds with the credentials: 1 hour for a default role session, about 6 hours on an EC2 instance
tport.space, any Signature V4 toolThe tool's own default7 days
rclone linkAsks for the longestCuts anything longer to 1 week, with a notice

The trap on AWS is the temporary credential: ask for 7 days from an EC2 role and the link can still die within hours, with no error at signing time. It's also worth knowing that an expiry is checked when a request starts. AWS says a download already running will finish, but a restart after the expiry time fails.

That affects big files. 5 GB at 20 Mbit/s takes 33 minutes, so a 15-minute link works until the connection drops at minute 20, and then a resume fails. Set the expiry to at least twice the slowest realistic transfer.

Working commands

All run against the same endpoint settings as our S3 client guide. For a download:

bash
# 1 hour
aws s3 presign s3://docs/invoices/2026-11.pdf --expires-in 3600 \
  --endpoint-url https://s3.tport.space --profile tport

To save the file under a friendlier name than its key, sign the name into the link. The AWS CLI's presign has no option for this, so use an SDK:

python
url = s3.generate_presigned_url(
    "get_object",
    Params={
        "Bucket": "docs",
        "Key": "invoices/2026-11.pdf",
        "ResponseContentDisposition": 'attachment; filename="invoice-november.pdf"',
    },
    ExpiresIn=900,
)

To take an upload, sign the content type too, so the link accepts only that type. Use a fresh, server-chosen key for each upload, because the link can overwrite that file until it expires.

python
url = s3.generate_presigned_url(
    "put_object",
    Params={"Bucket": "docs", "Key": "incoming/8f3a1c.zip", "ContentType": "application/zip"},
    ExpiresIn=1800,
)
bash
curl --upload-file report.zip -H 'Content-Type: application/zip' "$URL"

A presigned PUT doesn't cap the file size. On tport.space one request carries up to 100 MB, so that is the ceiling for a single PUT. On Amazon S3 the single-PUT limit is 5 GB, and a POST policy is how you set a smaller one there. If size matters on any service, check the object with a HEAD after upload and delete what's over.

A public file needs no signing. Upload to a bucket with Public switched on, and the address is the one the console shows:

bash
aws s3 cp brochure.pdf s3://marketing/brochure.pdf \
  --endpoint-url https://s3.tport.space --profile tport

# https://marketing-k3x9qa.tport.space/brochure.pdf

If rclone is already set up, as in our retention guide, rclone link tport:docs/invoices/2026-11.pdf --expire 1h makes a link too. We checked this on the live service on 3 November 2026 with rclone v1.75.2: asked for --expire 30d, it made a 7-day link instead, and both links downloaded the file.

What we saw when we tried to break them

We ran these on 3 November 2026 against a local test copy of the tport.space S3 service, with AWS CLI 2.25.4 and boto3. The public-file results further down were repeated on the live service on 8 November 2026. A plain request for the private file with no signature got a 403, as it should.

TestResult
GET with the link, within expiry200
Range request with the link206, so players and download managers work
HEAD, PUT or DELETE with a GET link403 each; a link is tied to its method
Change the file name in the link403 SignatureDoesNotMatch
Change X-Amz-Expires from 3,600 to 604,800403 SignatureDoesNotMatch
Link with exactly 604,800 s200
Link with 604,801 sThe CLI made it; the service answered 400
5-second link, used after 7 seconds403 Request has expired
Overwrite the file, use the old link200 with the new content
Delete the file, use the link404
PUT link with the wrong or no content type403
PUT link used a second time200, and the file was replaced
PUT link signed by a read-only key403 This key is read-only

Two results are easy to get wrong. A link points to a file name, not to a version of the file, so overwriting a file changes what an old link serves. And a PUT link is reusable: anyone holding it can replace the upload until it expires, so move or process the file promptly.

Public files, checked on the live service on 8 November 2026 with one public and one private bucket made for the test and deleted afterwards:

TestResult
GET and HEAD a file by its public address200, text/plain, exact bytes
PUT to the public address with no signature405, Allow: GET, HEAD
/ with no index.html404 Not found, no listing
/folder/ with folder/index.html200, the page, text/html
Range bytes=0-4206, Content-Range: bytes 0-4/42
GET and preflight from another siteAccess-Control-Allow-Origin: *; preflight 204, GET, HEAD
Presigned GET on the S3 host from another site200, no Access-Control-Allow-Origin
A private bucket's public address404, while a presigned link to the same file gave 200
Public switched off404 within about 5 seconds

How to take a link back

There's no way to cancel a single link. You can delete or rename the file, which ends every link to it. Or you can delete the key that signed it, which ends every link that key signed, on AWS as well as here. In our test a link signed by a deleted key kept working for 60 seconds, then returned 403, because key lookups are cached for that long.

That gives you a simple way to limit the damage. Sign links with their own key, read-only and limited to one bucket, so it can't do anything else if it leaks, and so you can delete it without touching your application's other keys. In our test, a link from a key limited to one bucket got a 404 for a file in another bucket.

Browser pages need one more check

A plain link or a redirect works from anywhere. A fetch() from your own site's page is different, because the browser asks for permission. On the live service on 8 November 2026, a request from another site to the S3 host got no Access-Control-Allow-Origin header, so the browser would block the script from reading it, and bucket CORS settings aren't supported yet. The public host answered with Access-Control-Allow-Origin: *. So for files a page's script must read, use a public bucket or fetch through your own server. Each new presigned link is also a new URL, so browsers and shared caches treat it as a new file, another reason to serve site assets as public files.

Public files have a cost side on some services, since anyone can download them as often as they like. Our egress comparison has the per-terabyte prices.

Make one bucket for public files and one for private, then try a 15-minute link.

Explore tport.space

Sources, read 3 November 2026