-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Error on s3 cp command when specifying the global s3 endpoint url #8896
Comments
Hey simonrdz@ thanks for reaching out! I have tested with the same environment (Ubuntu 24.04 and aws-cli/1.34.11) and ran the command: It would be recommended to use the latest version of AWS CLI also: https://docs.aws.amazon.com/cli/latest/userguide/cliv2-migration.html . Could you please provide the full debug logs of the command? You can get debug logs by adding --debug to your command, and redacting any sensitive information. Thank you |
Hey simonrdz@, the behavior you are seeing is because the bucket is not in US-EAST-1. Per [1] [2], requests made to the global s3 endpoint: http://s3.amazonaws.com are directed to the buckets in US-EAST-1. In my testing, I was able to reproduce the error where my bucket is in US-WEST-2 Oregon and only had http://s3.amazonaws.com : Then resolving the error by adding the region on the request endpoint and I was able to download the object successfully: Please let me know if this works for you or not or if you have any follow up questions. [1] https://aws.amazon.com/blogs/aws/amazon-s3-path-deprecation-plan-the-rest-of-the-story/ |
Hi @adev-code I appreciate your feedbacks my point is how to handle the region without knowing it in advance. |
Hi simonrdz@ S3 requests should go to a supported S3 endpoint. You can see the supported endpoints here: https://docs.aws.amazon.com/general/latest/gr/s3.html. If specifying –endpoint-url http://s3.amazonaws.com worked on older versions then that may have been a bug. But we recommend migrating to V2 of the AWS CLI if possible, or at least upgrading to a more recent version of v1, since 1.18.14 is several years old. (The latest version per the CHANGELOG is 1.34.16) |
Hi thanks for your time. I didn't know the old behavior might have been a bug. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
The following command fails
Expected Behavior
The command should download the file
Current Behavior
The command does not download the file
Reproduction Steps
Possible Solution
No response
Additional Information/Context
Did not reproduce with an old v1 version -> 1.18.140
CLI version used
aws-cli/1.34.11 Python/3.8.10 Linux/6.8.0-1014-aws botocore/1.35.11
Environment details (OS name and version, etc.)
Ubuntu 24.04
The text was updated successfully, but these errors were encountered: