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.

  1. Create an IAM user in the source account and one in the destination account, each with read/write access to the relevant S3 bucket.
  2. 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.
  3. Configure both IAM users' credentials as separate AWS CLI profiles on that machine.
  4. Confirm each profile can see its bucket:
    aws s3 ls
  5. Copy the source bucket's contents to local disk (run this inside screen or tmux for a large bucket, since it can take a while):
    aws s3 cp s3://source-bucket /path/to/local/ --recursive
  6. 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
  7. 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

  1. Create an IAM user in the source account with access to the source bucket.
  2. 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/*"
        }
      ]
    }
  3. Confirm the user can see both buckets:
    aws s3 ls s3://source-bucket
    aws s3 ls s3://destination-bucket
  4. 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.

Related services

AWS managed services

monitoring, cost optimisation, security and 24/7 support.

Hire an expert

engineers per 15 minutes, per hour or per month, with no contract.

Was this answer helpful?

Still stuck? Open a ticket