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,

demandé il y a 5 ans4505 vues
2 réponses
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

répondu il y a 5 ans
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
répondu il y a 5 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions