Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws s3 cp failed in UAE when tried to copy files from another region #8184

Closed
wc5858 opened this issue Sep 20, 2023 · 3 comments
Closed

aws s3 cp failed in UAE when tried to copy files from another region #8184

wc5858 opened this issue Sep 20, 2023 · 3 comments
Assignees
Labels
bug This issue is a bug. p2 This is a standard priority issue s3

Comments

@wc5858
Copy link

wc5858 commented Sep 20, 2023

Describe the bug

The following command failed in UAE:

aws s3 cp s3:/xxx/xxx.tar.gz ./

The xxx bucket locates in us-east-1 region.
The error is:

An error occurred (IllegalLocationConstraintException) when calling the GetObject operation: The unspecified location constraint is incompatible for the region specific endpoint this request was sent to.

But this command works in other regions.

And in UAE it could work if we specify the region:

aws s3 cp s3:/xxx/xxx.tar.gz ./ --region=us-east-1

Expected Behavior

The command should work without specifying source region of the s3 bucket just like other regions do.

Current Behavior

The command doesn’t work in UAE without specifying source region of the s3 bucket.

Reproduction Steps

Use following command in UAE to copy file from a bucket in another region:

aws s3 cp s3:/xxx/xxx.tar.gz ./

Possible Solution

No response

Additional Information/Context

No response

CLI version used

aws-cli/2.13.17 Python/3.11.5 Linux/5.10.186-179.751.amzn2.x86_64 exec-env/CloudShell exe/x86_64.amzn.2 prompt/off

Environment details (OS name and version, etc.)

Linux

@wc5858 wc5858 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Sep 20, 2023
@RyanFitzSimmonsAK RyanFitzSimmonsAK self-assigned this Sep 20, 2023
@RyanFitzSimmonsAK RyanFitzSimmonsAK added s3 investigating This issue is being investigated and/or work is in progress to resolve the issue. p2 This is a standard priority issue and removed bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Sep 20, 2023
@RyanFitzSimmonsAK
Copy link
Contributor

Hi @wc5858, thanks for reaching out. UAE is an opt-in region, and you need to specify the region for opt-in regions to make this request. You can either specify --region us-east-1 or --endpoint-url https://s3.us-east-1.amazonaws.com. The latter should allow you to make this request from the UAE region. Hope that helps!

@RyanFitzSimmonsAK RyanFitzSimmonsAK added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Sep 20, 2023
@wc5858
Copy link
Author

wc5858 commented Sep 21, 2023

Hi @wc5858, thanks for reaching out. UAE is an opt-in region, and you need to specify the region for opt-in regions to make this request. You can either specify --region us-east-1 or --endpoint-url https://s3.us-east-1.amazonaws.com. The latter should allow you to make this request from the UAE region. Hope that helps!

Thanks for replying!

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Sep 21, 2023
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p2 This is a standard priority issue s3
Projects
None yet
Development

No branches or pull requests

2 participants