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,

已提问 5 年前4504 查看次数
2 回答
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

已回答 5 年前
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
已回答 5 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则