How to switch between S3 buckets quickly
TL;DR
From the AWS CLI: configure named profiles in ~/.aws/credentials and switch with AWS_PROFILE — the right pattern for scripts. From the AWS console: navigate per-account and re-authenticate every time. From S3 Viewer: every connected server and its buckets sit in one sidebar, so switching between an AWS bucket and an R2 bucket is a click, with no sign-in in between.
Steps
Step-by-step.
- 01
In S3 Viewer: pick the server in the sidebar
Every connection you have added with Add server is listed in the sidebar — AWS, R2, MinIO, anything you have wired up. Selecting one loads its buckets underneath it. - 02
Click the bucket
The file list swaps to that bucket's root. No re-authenticating and no profile switching — the credential for that server is already stored and is used to sign the request. - 03
AWS CLI: named profiles
Configure profiles in~/.aws/credentialsand switch withAWS_PROFILE. The right pattern for scripts and single-shell workflows.AWS_PROFILE=acme aws s3 ls s3://bucket-name - 04
AWS CLI for R2/B2/MinIO: --endpoint-url
For Cloudflare R2, Backblaze B2, or MinIO, pass the endpoint explicitly. The credentials format is the same; only the URL changes.aws s3 ls --profile r2 \ --endpoint-url https://<account>.r2.cloudflarestorage.com - 05
Across multiple AWS accounts
Add each account's credentials as its own server. In S3 Viewer they are separate entries in the sidebar; in the CLI they are separate profiles.
Under the hood
What's actually happening.
The AWS CLI scopes credentials per profile (~/.aws/credentials) and you switch by setting AWS_PROFILE. That's the right pattern for scripts and single-shell workflows. For interactive sessions where you bounce between many buckets, the cost is not the switch itself but the re-authentication and the context loss around it. S3 Viewer keeps every server you have added in one sidebar and routes each click to that server's stored credential, so moving between an AWS bucket and an R2 bucket is the same gesture as moving between two folders.
FAQ
Common questions.
What's the fastest way to switch between AWS S3 buckets?
Can I have buckets from multiple AWS accounts open at once?
How do I switch between AWS profiles in the CLI?
Can I jump between an AWS bucket and a Cloudflare R2 bucket?
Use S3 Viewer for this
Skip the CLI. Try it in the browser.
S3 Viewer turns the steps above into a single click. Open source, self-hostable, free.
Use case
Why teams pick this
Related guides
More how-tos
View S3 + R2 together
One credential per provider, one sidebar, and one click to switch between them.
Search inside a bucket
S3 has no search API. Filter by prefix in the current folder, or reach for S3 Inventory + Athena.
Invite a teammate
Skip per-person IAM users for human collaboration. Email invite, per-bucket role, one-click revoke.