-
-
Notifications
You must be signed in to change notification settings - Fork 228
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
S3 broken due to deprecated URLs #630
Comments
Current service description from AWS (https://github.com/boto/botocore/blob/develop/botocore/data/s3/2006-03-01/service-2.json) is wrong. I have filed an issue boto/botocore#2397 to see what is going on. |
Boto swallows the incorrect definitions and handles them in code: boto/botocore#52 (Initial PR from 2013, implementation has evolved since) |
This is also happening with |
S3 and |
AWS S3 has two styles of S3 URLs:
https://s3{-<region>}.amazonaws.com/<bucket-name>/<object-or-command>
https://<bucket-name>.s3{.<region>}.amazonaws.com/<object-or-command>
Path-style is officially deprecated but still supported ([1], [2], [3]). It seems the way they are supporting this in
eu-west-2
is by returning a HTTP 301 redirect response.This means
Network.AWS.S3
is completely broken, at least for my bucket in this region.Example:
GHC session: (formatted for clarity)
If I intercept the request, I see it is:
Requesting this URL using Postman yields a '301 Moved Permanantly' response with the following body:
Correcting the URL to
Yields a correct 200 response.
Configuring
Service
will allow me to change the endpont, but this doesn't work, as it still appends the bucket name to the URL, as so:Which is incorrect and yields a 404 NoSuchKey.
This issue could be solved in one of two ways:
amazonka-s3
to use the supported virtual-hosting style URLsThe text was updated successfully, but these errors were encountered: