A client needs to send you 4 GB of raw footage. A designer has the final assets. A partner has a folder of scanned contracts. The files should end up in your S3 bucket, and the people sending them have no AWS account.
The shortcut everyone considers once is to hand over an access key. This post covers why that is a bad idea, how to do it properly with presigned upload URLs in a few lines of AWS SDK v3, where that approach runs out and a way to get the same result without writing the code.
How do I let someone upload to my S3 bucket without giving them my keys?
Give them a presigned upload URL, or a link that generates those URLs for them. A presigned URL lets one person write one object until it expires, and the bucket stays private.
You can sign those URLs in your own code, as shown below, or use a file request link from a tool such as Nubbo, which signs each upload for you and sends the file straight from the sender's browser to your bucket.
Why sharing your access keys is a bad idea
An access key is not a link. It is a credential with every permission its IAM user has, and it does not expire on its own.
- It does more than upload. Unless you wrote a tight policy, the same key can list, download, overwrite and delete.
- It never ends. It works until you deactivate it, long after the project is over.
- It looks like you. Anything done with it is logged under your IAM user, so you cannot tell one sender from another.
- Cutting one person off hurts everyone. If two clients share a key, revoking it for one revokes it for both and for any script that uses it.
- It travels. Keys pasted into email or chat end up in places you do not control.
The same reasoning applies to keys from any S3-compatible provider.
The DIY way: presigned PUT URLs
A presigned URL carries a signature that allows one operation on one object. AWS puts it plainly: "Using a presigned URL will allow an upload without requiring another party to have AWS security credentials or permissions." Your server signs a PUT for a key, hands the URL to the browser and the browser sends the file straight to the bucket. Your server never touches the bytes, and signing does not call S3: the signature is computed locally.
On the server, with AWS SDK v3:
import { randomUUID } from 'node:crypto' import { S3Client, PutObjectCommand } from '@aws-sdk/client-s3' import { getSignedUrl } from '@aws-sdk/s3-request-presigner' const s3 = new S3Client({ region: 'eu-west-1' }) export async function signUpload(contentType) { const key = `incoming/${randomUUID()}` const url = await getSignedUrl( s3, new PutObjectCommand({ Bucket: 'my-bucket', Key: key, ContentType: contentType }), { expiresIn: 900, signableHeaders: new Set(['content-type']) } ) return { key, url } } In the browser, after asking your server for a URL:
await fetch(url, { method: 'PUT', headers: { 'Content-Type': file.type }, body: file, }) The browser must send exactly the content type it gave your server. Three details that save debugging time:
- The key is generated on the server. A UUID prefix means a visitor cannot overwrite someone else's file. Uploading again to an existing key replaces the object.
-
signableHeadersbinds the content type. An upload with a differentContent-Typeis rejected withSignatureDoesNotMatch, which is also the usual reason a correct looking URL fails. - Other providers use the same code. Cloudflare R2, Wasabi, Backblaze B2 and DigitalOcean Spaces accept presigned PUT URLs through their S3 API. On R2 use
region: 'auto'and the<ACCOUNT_ID>.r2.cloudflarestorage.comendpoint. If uploads fail against an S3-compatible provider with signature or checksum errors, setrequestChecksumCalculation: 'WHEN_REQUIRED'on the client, since current AWS SDKs add a CRC checksum by default.
The bucket also needs a CORS rule so the browser is allowed to PUT from your origin:
[ { "AllowedOrigins": ["https://example.com"], "AllowedMethods": ["PUT"], "AllowedHeaders": ["*"], "ExposeHeaders": ["ETag"] } ] ETag only matters for multipart uploads, where the browser has to read it from each part.
Where presigned URLs run out
The signature is solid. Everything around it is yours to build.
- Expiry has a ceiling. Up to 7 days (604,800 seconds) when signed with IAM user keys. Signed with temporary credentials, such as a Lambda role or an EC2 instance profile, the URL dies when those credentials expire, often after an hour or a few hours. The JavaScript presigner defaults to 900 seconds.
- It is a bearer token. Anyone who gets the URL can use it, as many times as they like, until it expires. You cannot revoke one URL on its own.
- No size or type policy on PUT. Presigned POST has a policy that can limit size and content type, but not every provider supports it (R2 does not), so with PUT you check before you sign.
- One URL, one object. Ten files means ten signatures, and a single
PUTis capped at 5 GB. Beyond that you need multipart uploads with one signed URL per part. - No UI. You still need a page with a form, progress, retries and a way for senders to know it worked.
- No notice. Nothing tells you a file arrived unless you build it.
If you are building your own app and uploads belong inside it, that work is worth doing. If you just need people to send you files, it is a lot of code for a drop box.
The no-code way: a file request link
A file request, which Nubbo also calls an inbox, is a public upload link for a folder of your bucket. People open it in any browser and upload without an account. Underneath it is the same presigned pattern: each file goes from the sender's browser straight to your bucket with a presigned URL. Nubbo signs the upload and keeps only the name, size and path as an index.
How to set one up:
- Connect your bucket. Amazon S3, Cloudflare R2, DigitalOcean Spaces, Wasabi, Backblaze B2 or another S3-compatible endpoint. The bucket stays private and your keys are stored encrypted with AES-256-GCM. The connect wizard sets CORS for you when the key allows it.
- Create a file request and choose the folder where files arrive.
- Send the link.
- Get notified. Nubbo emails you and shows a notification when files arrive, and new arrivals carry a "Not reviewed" marker. The files are already in your bucket.
What you can set on each link:
| Option | What it does |
|---|---|
| Password | 4 to 50 characters |
| Expiry | The link stops accepting files on that date |
| Limits | A maximum file size and a maximum number of uploads |
| File types | Only the extensions you allow; empty accepts any |
| Sender details | Ask senders for their name, as required or optional; they may add their email |
That covers most of the gaps in the list above: size and type limits, an end date you choose, a page senders can use and a notice when something lands.
The Free plan includes 3 file requests; Personal, Pro and Teams have no limit. On paid plans a file request can also be encrypted in the sender's browser, so neither Nubbo nor your provider can read what arrives. From Pro you can embed the same upload form on your own site, and the n8n, Zapier and Make integrations can start a flow on every upload.
Which one should you use?
- You are building an app and want uploads inside it: sign presigned URLs in your own code, as above.
- Your React app already runs on AWS Amplify and its users sign in through it: Amplify UI's FileUploader component, which works with Amazon S3 only.
- You just need people to send files into your bucket, on any provider, without code: a file request link.
Either way, nobody gets your keys.
To connect your bucket, follow the Amazon S3 guide (there are guides for R2, Wasabi, B2 and Spaces too). The options compared step by step are in how to let anyone upload files to your S3 bucket. Nubbo has a Free plan with no card that includes 3 file requests.
