Sync to me-south-1 from eu-west-1 error!

0

Hi,

I would like to move the S3 bucket from eu-west-1 (Paris) to me-south-1 (Bahrain), but the AWS cli gives and error:

fatal error: An error occurred (IllegalLocationConstraintException) when calling the ListObjectsV2 operation: The me-south-1 location constraint is incompatible for the region specific endpoint this request was sent to.

Is this my bad, or yet not supported?

Thanks,

asked 5 years ago4455 views
2 Answers
0

Hi,
I was able to successfully run the aws s3 sync command from a source bucket in eu-west-1 to a target bucket in me-south-1. Here are the steps I performed.

I first created a bucket in eu-west-1:

aws s3api create-bucket --bucket xxxx-paris --region eu-west-1  --create-bucket-configuration LocationConstraint=eu-west-1

It was successfully created and returned:

{
    "Location": "http://xxxx-paris.s3.amazonaws.com/"
}

I created a file called hello.txt and uploaded it to the newly created bucket in eu-west-1:

aws s3 cp hello.txt s3://xxxx-paris/hello.txt

I then created a bucket in me-south-1:

aws s3api create-bucket --bucket xxxx-paris2 --region me-south-1 --create-bucket-configuration LocationConstraint=me-south-1

It was successfully created and the following was returned in the terminal:

{
    "Location": "http://xxxx-paris2.s3.amazonaws.com/"
}

I then ran the aws s3 sync command to sync the contents of the bucket in eu-west-1 to the bucket in me-south-1:

aws s3 sync s3://xxxx-paris s3://xxxx-paris2 --source-region eu-west-1 --region me-south-1

And then it shows that it succesfully copied over the file:

copy: s3://xxxx-paris/hello.txt to s3://xxxx-paris2/hello.txt

I wasn't able to reproduce, but maybe if you try the above steps in your environment and see if that works, you can narrow down what your original problem might have been.

Also, to help debug the issue, add the --debug to the aws s3 sync command.
Hope this helps.
-randy

answered 5 years ago
0

Thanks, adding source & destinaction region solved the issue.

aws s3 sync s3://site.com s3://site-bahrin --source-region eu-west-1 --region me-south-1
answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions