Created
December 5, 2015 20:27
-
-
Save alanwill/31c3232049eeaae14b23 to your computer and use it in GitHub Desktop.
Move an S3 bucket to a different region
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws s3 sync s3://oldbucket s3://newbucket --source-region us-west-1 --region us-west-2 |
Move a foobucket from us-west-1 to us-west-2
-- Create tmpbucket
$ aws s3 sync s3://foobucket s3://tmpbucket --source-region us-west-1 --region us-west-2
$ aws s3 rb s3://foobucket --force
-- Recreate foobucket in us-west-2, but you might have to wait due to caching
$ aws s3 sync s3://tmpbucket s3://foobucket --source-region us-west-2 --region us-west-2
Remember to copy over any CORS permissions etc too
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To simplify the synchronization of data from one S3 bucket to another, please take a look at the sync-buckets-state-machine project on awslabs: