
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 to | Use | Expiry we'd set | Why |
|---|---|---|---|
| Serve site images, downloads, scripts | Public bucket | None | Stable address that caches well, and pages on other sites can fetch it |
| Let a signed-in customer download an invoice | Presigned GET, made on click | 15 minutes | Your app checks who is asking, every time |
| Send a colleague a file by chat or email | Presigned GET | 1 to 7 days | No account needed, and it ends by itself |
| Take a file from someone outside | Presigned PUT | 15 to 30 minutes | They get one file name, not a key |
| Give a link that lasts longer than 7 days | A route in your app that signs on click | 15 minutes per click | 7 days is the ceiling, so the app must renew it |
| Give a partner regular access | A read-only key for one bucket | Until you delete it | A 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 file | Presigned link | Access key | |
|---|---|---|---|
| Who can use it | Anyone with the address | Anyone with the link | Anyone with the ID and secret |
| Reaches | Every file in that bucket, if the name is known or guessed | One file, one method | Every bucket and file the key allows |
| Ends | When you switch Public off or delete the file | At expiry, or when the signing key is deleted | When you delete the key |
| Reveals | Bucket address and file path | Bucket, file path, access key ID, date, region | Everything; it is the credential |
| Secret in the URL | None needed | No, only a signature made with it | Not 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 made | Default | Longest |
|---|---|---|
AWS CLI, aws s3 presign | 3,600 s (1 hour) | 604,800 s (7 days) |
| AWS SDKs, IAM user keys, Signature V4 | Varies by SDK; 3,600 s in boto3 | 7 days |
| Amazon S3 console | Set when you create it | 12 hours (minimum 1 minute) |
| AWS temporary credentials | Ends with the credentials: 1 hour for a default role session, about 6 hours on an EC2 instance | |
| tport.space, any Signature V4 tool | The tool's own default | 7 days |
rclone link | Asks for the longest | Cuts 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:
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:
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.
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:
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.
| Test | Result |
|---|---|
| GET with the link, within expiry | 200 |
| Range request with the link | 206, so players and download managers work |
| HEAD, PUT or DELETE with a GET link | 403 each; a link is tied to its method |
| Change the file name in the link | 403 SignatureDoesNotMatch |
Change X-Amz-Expires from 3,600 to 604,800 | 403 SignatureDoesNotMatch |
| Link with exactly 604,800 s | 200 |
| Link with 604,801 s | The CLI made it; the service answered 400 |
| 5-second link, used after 7 seconds | 403 Request has expired |
| Overwrite the file, use the old link | 200 with the new content |
| Delete the file, use the link | 404 |
| PUT link with the wrong or no content type | 403 |
| PUT link used a second time | 200, and the file was replaced |
| PUT link signed by a read-only key | 403 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:
| Test | Result |
|---|---|
| GET and HEAD a file by its public address | 200, text/plain, exact bytes |
| PUT to the public address with no signature | 405, Allow: GET, HEAD |
/ with no index.html | 404 Not found, no listing |
/folder/ with folder/index.html | 200, the page, text/html |
Range bytes=0-4 | 206, Content-Range: bytes 0-4/42 |
| GET and preflight from another site | Access-Control-Allow-Origin: *; preflight 204, GET, HEAD |
| Presigned GET on the S3 host from another site | 200, no Access-Control-Allow-Origin |
| A private bucket's public address | 404, while a presigned link to the same file gave 200 |
| Public switched off | 404 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.spaceSources, read 3 November 2026
- Amazon S3, presigned URLs: who can create them, expiry, bearer tokens
- AWS CLI, s3 presign
- Amazon S3, uploading objects: 5 GB in one PUT
- Amazon S3, POST policy conditions
- rclone, link command
- tport.space, public files
- tport.space, S3 tools and SDKs
- tport.space, limits and supported operations