-
Notifications
You must be signed in to change notification settings - Fork 176
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
Old s3 path styles deprecated #107
Comments
FYI, here's what my workaround looks like: var signed = aws4.sign(
{
host: host || (bucket + '.s3.amazonaws.com'),
service: 's3',
region: region,
path: (host ? '/' + bucket : '') + '/' + key,
method: 'PUT',
signQuery: true
},
{ accessKeyId: accessKeyId, secretAccessKey: secretAccessKey }
); I'm thinking it may not be possibly to apply the necessary change in a backwards-compatible way. If no host is given it's assumed that Amazon AWS S3 is the target and follows the new convention. If a host is given it's assumed that it's another S3 provider (Minio, Digital Ocean, etc) and that the bucket should be part of the url. |
I've fixed the parsing aspect of this in v1.10.0 I think you're right that somehow constructing the host if the user has given the bucket in the path would be a bit problematic to stay backwards compatible, so I'm not going to support that. I think from now on people will just need to specify the host when they want to query a particular bucket – aws4 should figure out the region and service correctly from there. |
s3 is not honoring the old path style for much longer (Deadline: Sept 2020)
it also seems that new buckets are not supported with the old style at all
Old
https://s3.amazonaws.com/<bucket>/<key>
https://s3-<region>.amazonaws.com/<bucket>/<key>
.
https://s3.amazonaws.com/jbarr-public/images/ritchie_and_thompson_pdp11.jpeg
https://s3-us-east-2.amazonaws.com/jbarr-public/images/ritchie_and_thompson_pdp11.jpeg
New
https://<bucket>.s3.amazonaws.com/<key>
https://jbarr-public.s3.amazonaws.com/images/ritchie_and_thompson_pdp11.jpeg
Reference
See https://aws.amazon.com/blogs/aws/amazon-s3-path-deprecation-plan-the-rest-of-the-story/
The text was updated successfully, but these errors were encountered: