Updated: 22 October 2026 · Applies to: AWS S3, the AWS CLI
There are two straightforward ways to migrate an S3 bucket's contents to a different AWS account.
Method 1: via a local or EC2 copy
S3 bucket names are unique across the whole of S3, so you cannot create a bucket with the identical name in the destination account while the source bucket still exists under that name. Copy the content out to a temporary location first, then create the real destination bucket with the original name once the source bucket has been removed.
- Create an IAM user in the source account and one in the destination account, each with read/write access to the relevant S3 bucket.
- Run the copy from a Linux machine with the AWS CLI installed; an EC2 instance in the same AWS account as the source bucket gives the best network speed, but any Linux machine works.
- Configure both IAM users' credentials as separate AWS CLI profiles on that machine.
- Confirm each profile can see its bucket:
aws s3 ls
- Copy the source bucket's contents to local disk (run this inside
screenortmuxfor a large bucket, since it can take a while):aws s3 cp s3://source-bucket /path/to/local/ --recursive
- Copy from local disk to the destination bucket, using the destination account's profile:
aws s3 cp /path/to/local/ s3://destination-bucket --recursive --profile destination-profile
- Confirm both sides match:
aws s3 ls --summarize --human-readable --recursive s3://source-bucket | tail -n 2 aws s3 ls --summarize --human-readable --recursive s3://destination-bucket --profile destination-profile | tail -n 2
Method 2: with a single IAM user given access to both buckets
- Create an IAM user in the source account with access to the source bucket.
- Grant that same IAM user access to the destination bucket too. If the destination bucket does not exist yet, create it and attach a bucket policy such as:
{ "Version": "2012-10-17", "Statement": [ { "Sid": "AddPerm", "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::bucket-name/*" } ] } - Confirm the user can see both buckets:
aws s3 ls s3://source-bucket aws s3 ls s3://destination-bucket
- Copy directly between the two buckets, with no local copy needed:
aws s3 cp s3://source-bucket/ s3://destination-bucket/ --recursive
Or, to mirror ongoing changes instead of a one-off copy:aws s3 sync s3://source-bucket/ s3://destination-bucket/ --recursive
Once the migration is confirmed complete, remove the old source bucket, create a bucket with that name on the destination account if you need to keep the same name, and clean up any temporary bucket used along the way.