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. From S3 Viewer: hit Cmd-K and fuzzy-match any bucket on any connected provider — across AWS accounts, across Cloudflare R2, MinIO, B2, all in one switcher.

Steps

Step-by-step.

  1. 01

    In S3 Viewer: press Cmd-K

    A bucket switcher opens with fuzzy matching across every bucket on every connected provider — AWS, R2, MinIO, anything you've wired up.
  2. 02

    Type any part of the name

    Match by bucket name or provider. Hit Enter to jump. No re-authenticating, no profile switching.
  3. 03

    AWS CLI: named profiles

    Configure profiles in ~/.aws/credentials and switch with AWS_PROFILE. The right pattern for scripts and single-shell workflows.
    AWS_PROFILE=acme aws s3 ls s3://bucket-name
  4. 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
  5. 05

    Across multiple AWS accounts

    Add each account's credentials separately. In S3 Viewer they show up grouped by account in the sidebar; in the CLI they're 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, a Cmd-K switcher is faster — S3 Viewer keeps every connected bucket loaded and routes each click to the right signer behind the scenes, so jumping is just fuzzy search over your bucket list.

FAQ

Common questions.

What's the fastest way to switch between AWS S3 buckets?

It depends on the workflow. For scripts, AWS CLI named profiles toggled with AWS_PROFILE are ideal. For interactive work where you bounce between many buckets in a session, a Cmd-K bucket switcher (like S3 Viewer's) is faster — fuzzy-match the bucket name and jump in two keystrokes, no profile switching, no re-authenticating.

Can I have buckets from multiple AWS accounts open at once?

Yes. Connect each AWS account separately — S3 Viewer keeps a separate signer per credential. Buckets show up in the sidebar grouped by account so you can tell them apart.

How do I switch between AWS profiles in the CLI?

Set the AWS_PROFILE environment variable per command (`AWS_PROFILE=acme aws s3 ls`) or per shell (`export AWS_PROFILE=acme`). Profiles are configured in ~/.aws/credentials.

Can I jump between an AWS bucket and a Cloudflare R2 bucket?

Yes — Cmd-K in S3 Viewer covers every connected provider in one switcher. The same hotkey jumps from AWS to R2 to MinIO without re-authenticating, since each provider keeps its own credential under the hood.
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 for personal use.