How do I move files from one S3 bucket to another?

I need to transfer a large number of files between two AWS S3 buckets and I’m unsure about the best way to do this efficiently. I tried using the AWS console but it seems slow and manual for many files. Looking for advice or step-by-step instructions to speed up the process and avoid data loss.

Moving Files Between S3 Buckets: A Survival Guide

Ever tried to shuffle files between S3 buckets?

If you’re anything like me, you’ve stared down AWS S3 from behind a cold coffee, half-convinced there’s a secret handshake needed to get files moved around. So, picture this: you’ve got a data swamp in Bucket A but a pristine new Bucket B ready for action. Time to clean house and get stuff moved.

The Quick & Dirty: Using AWS CLI

Honestly, the AWS Console isn’t my weapon of choice for this—too many clicks, way too easy to mis-click and lose track. What you want is the AWS CLI. Installing it’s simple (docs are here if you need ‘em: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html). Once you’ve got that, it’s as easy as:

aws s3 cp s3://bucket-a/myfolder/ s3://bucket-b/myfolder/ --recursive

That sucker does a deep copy, folder and all.

But, and this is important, you might not always want to copy. Sometimes you want to flat-out move—no leftovers. In that scenario, you need to copy first and then remove from the source bucket:

aws s3 mv s3://bucket-a/myfolder/ s3://bucket-b/myfolder/ --recursive

Boom. Gone from A, now happily in B.

Drag, Drop, Done… Without the Headaches

I mean, sometimes I just want to treat cloud files the way I treat my local stuff—drag here, drop there, done. This is where less command-line-y folks usually start poking around for an easier tool. There are apps that turn cloud storage into something your desktop understands—like a regular old drive.

I stumbled across CloudMounter the last time I wanted S3 to act like a folder on my Mac. Plug it in, link your S3, and suddenly your buckets sit right next to Downloads in Finder. Drop files between buckets/tabs, and honestly: it’s like S3 never left 2012. Basically, it makes those big, scary AWS buckets behave, even for the less “terminal-friendly” among us.

If you absolutely, positively must run a script…

Yeah sure, Python’s boto3 works too. You loop through objects and transfer them, but script failures mid-job are a pain—especially if the folders are huge (ask me about my 3 a.m. S3 error hunt sometime).

TL;DR

  • CLI commands: direct and powerful, but you gotta watch your options.
  • Scripts: customizable, but a bit fiddly and easy to break.
  • Third-party desktop apps: let you drag-and-drop S3 files like it’s a desktop folder (CloudMounter), so you get to skip the headaches.

For those who’d rather not risk “fat finger deletes” or hunt through endless AWS menus, having your S3 buckets just show up in Finder is honestly a lifesaver.

And that’s about it—move your files however you fancy, just back up your stuff first. Because if Murphy’s Law loves anything, it’s a careless admin.

5 Likes

First off, I get the CLI and CloudMounter love from @mikeappsreviewer, but let’s be real—sometimes the CLI is a straight-up time sink once you get into a sea of folders and permission errors, and third-party apps add their own learning curve/billing fun. I’ll throw another card on the table, more in the “automagic scale” direction: S3’s built-in Replication.

If both your buckets are in the same AWS account (or can be made to trust each other), you can set up Cross-Region Replication (CRR) or even same-region replication. It copies everything behind the scenes, new stuff included. Go to Management > Replication in the S3 console; point it at your target, set up a role, and let AWS do the heavy lifting. The kicker: no manual copy-paste marathon, and if there’s a hiccup, AWS retries until it sticks. Downside: it only kicks in for new files after you set it up. For the backlog, you still need to “seed” it with CLI or such once, but then you’re future-proof.

Alternatively, for truly massive buckets or a one-off, AWS DataSync is built exactly for this scenario—thousands/millions of files, huge folders, plus error handling and progress reporting that the CLI can only dream about. It costs a bit but saves times (and deletes the risk of “oh no, the process bombed at 47%”).

Hot take: Python scripts (boto3) are overrated for big jobs unless you want total control and scripting joy. Wanna live on the edge? Write your own, but be ready for retries, partial failures, weird object key edge-cases—all nighters await.

Anyway—pick your weapon:

  • CLI for one-and-done (unless the size terrifies you),
  • DataSync/Replication for ongoing or scale,
  • CloudMounter if you like seeing S3 as a folder,
    — but all are legit. Just maybe don’t try all at once or you’ll create a quantum duplicate bucket paradox.

Not to pile on after @mikeappsreviewer and @caminantenocturno’s full-blown AWS war stories, but is anyone else perpetually annoyed that simple file moves in S3 are still such a circus? Seriously, 2024 and Amazon’s UI acts like dragging GBs of files is a weekend project. And yeah, CLI and DataSync are tried and true—unless you have the patience of a monk when you hit that “Access Denied” error on object #12,043 after four hours because someone toggled a bucket policy.

So here’s the take no one mentioned: Use AWS Transfer Family SFTP (bear with me). Sometimes going old-school FTP/SFTP feels clunky, but if your org has legacy systems or non-dev users, mapping S3 buckets to an SFTP endpoint lets users “move” files with ANY SFTP client. You can even automate it with cron jobs or use rsync-for-the-win (if you set it to wipe after sync, it actually feels like a traditional move). Not saying it beats DataSync for sheer speed, but it’s surprisingly robust and user-context-friendly, especially for the file-happy-lazy among us.

Oh, and about CloudMounter—yes, it’s dead simple and a dream for folks who just want buckets to look like plain ol’ Finder folders. But don’t sleep on the fact that it abstracts away AWS permissions, too—which can be a happy accident or a disaster depending on your IT hygiene. In any case, for the “I just want to drag-and-drop and not read AWS whitepapers” crowd, CloudMounter is the low-stress way out, no shame in that.

TLDR: Console = pain, CLI = nerd pride, DataSync = big jobs, Replication = set-and-forget, CloudMounter = Mac magic, SFTP = connective tissue for the rest of us. Pick your poison… but maybe keep a backup, unless you enjoy the gentle thrill of accidental file loss.