How to download a file from S3
Three patterns. Click it in S3 Viewer (a 15-minute presigned URL is signed server-side; your AWS keys never reach the browser, and the filename and extension are inferred from ContentType). Run `aws s3 cp s3://bucket/key ./` from a terminal. Or send a presigned URL to anyone who doesn't have AWS access.
Step-by-step.
- 01
In S3 Viewer: click the file
Hit the download button. The file streams from your bucket through your browser via a short-lived (15 minute) presigned URL signed server-side using your encrypted credentials — your AWS keys never reach the client. The filename and extension are inferred from the object's ContentType header, so the file lands on disk with the right name even if the key was a raw UUID. - 02
Multi-select to grab several at once
Shift-click a range and download — same UX as a desktop file manager. - 03
AWS CLI: aws s3 cp (single file)
For one file. Streams directly to disk.aws s3 cp s3://my-bucket/path/to/file.pdf ./ - 04
AWS CLI: aws s3 sync (whole prefix)
Mirrors a prefix to a local directory and skips files you already have. The right pattern for backups or local development.aws s3 sync s3://my-bucket/reports/ ./reports/ - 05
AWS SDK: GetObject
For a backend, stream the response body to a file or to a response stream.const obj = await s3.getObject({ Bucket: 'my-bucket', Key: 'file.pdf', }); await pipeline(obj.Body, fs.createWriteStream('./file.pdf')); - 06
Sharing: presigned URL for someone without AWS
Right-click → Share link in S3 Viewer, or runaws s3 presign. Same primitive — works in any browser, expires when you say. Treat it as a bearer token.aws s3 presign s3://my-bucket/file.pdf --expires-in 3600
What's actually happening.
A download is a GetObject API call. The CLI streams the response body to a local file; SDKs return a readable stream you pipe wherever you want; S3 Viewer signs a short-lived presigned URL server-side using your encrypted credentials, infers the filename and extension from the ContentType header, and the browser fetches that URL — so your AWS keys never reach the client. Sharing with a non-AWS user is the same primitive: a presigned URL is just a signed query-string version of GetObject anyone with the link can fetch until it expires.
Common questions.
How do I download a file from an S3 bucket?
How do I download an entire S3 prefix or folder?
How do I download a file from someone else's S3 bucket?
Why do my AWS keys never reach the client in S3 Viewer?
Can I download from Cloudflare R2 the same way?
Skip the CLI. Try it in the browser.
S3 Viewer turns the steps above into a single click. Open source, self-hostable, free for personal use.
Why teams pick this
More how-tos
Share an S3 file
Presigned URL or workspace invite — when each is the right call, and why presigned links can't be revoked.
Upload large files
Multipart upload — part sizes, parallelism, retries, and the 5 GB single-PUT cap that pushes you to multipart.
Search across buckets
How to actually search S3 with Tab autocomplete, and when S3 Inventory + Athena is the right pattern.