Amazon S3 will no longer support path-style API requests starting September 30th, 2020
https://forums.aws.amazon.com/ann.jspa?annID=6776
Would the following announcement have any impact on this package or any previous version. For example, we currently use version ^2.257.1 with the following call:
...
...
const s3 = new AWS.S3();
const params = {
Bucket: Config.aws.bucketName,
Key: "worker/" + name,
Body: ReadStream
};
try {
await s3.upload(params).promise()
...
...
Just wanted to get a consensus from the community on this announcement.
I have the same question for pre-signed posts. We currently use s3.createPresignedPost() to get a path to upload to S3, and that call currently returns a path-style url.
Hey @justinpage currently SDK defaults to use virtual-host style endpoints. So you should be fine for default configs. I'm not sure about the exact behavior when sending path style request to s3 after the cut-off time. I have reached out to service team to shed more light on this topic.
I have the same question for pre-signed posts. We currently use s3.createPresignedPost() to get a path to upload to S3, and that call currently returns a path-style url.
@jvarsanik Did you ever get any feedback about your question on pre-signed posts? I am finding that I am also getting a path-style URL for createPresignedPost, while I get Virtual Host if using getSignedUrl.
Hi @mischuler I never got any feedback. Looking here: https://forums.aws.amazon.com/ann.jspa?annID=6776 is seems that the plan has been revised - path-style requests will still be supported for existing buckets, and only new buckets will require virtual-hosted style requests.
However, I am still not sure why we are getting path-style URLs.
@jvarsanik I talked with AWS support and they confirmed that this is a bug in Javascript SDK. No ETA has been given, but I have a 'pending case' open now.
I also haven't been able to get a virtual-host style endpoint for an S3 signed URL for putObject.
It looks like it might work to create a new S3 SDK instance with the endpoint pointing at your bucket, but that's a lot of work for a long list of buckets.
@AllanFly120 Thank you for following up on this. Any updates?
@jvarsanik
I have a solution for the pre-signed post. You to specify your bucket as part of the upload. It won't work if you use it only as parameter. Set the bucketname in front of the end point and set the s3BucketEndpoint as true with the S3 Object.
` const bucket_name = 'test-bucket';
const api_root = 's3-fips.' + api_region + '.amazonaws.com';
const upload_file = 'index.js';
const download_file = 'tmp.txt'
AWS.config.update({ region: api_region });
var endpoint = bucket_name + '.' + api_root;
let s3 = new AWS.S3({endpoint: endpoint, s3BucketEndpoint: true});`
Hi, @mischuler
Thank you for reaching out. I label this as a feature request. We will fix this soon
Any progress on this? I just read an email from AWS stating that virtual host style URLs have been around for at least 10 years and deprecation for path style URLs is imminent but S3->getSignedURL() is still returning path style URLs for me. I haven't been able to find any documentation on how to get that method to return virtual host style URLs.
Hi @AllanFly120,
maybe it's worth labeling this as bug because in two months createPresignedPost will stop working for new buckets.
This is certainly a bug now and it is broken for new buckets.
Most helpful comment
This is certainly a bug now and it is broken for new buckets.