aws-sdk-js icon indicating copy to clipboard operation
aws-sdk-js copied to clipboard

Support for requester pays requests

Open mitar opened this issue 13 years ago • 8 comments

It seem there is no support for Requester Pays Buckets.

mitar avatar Apr 11 '13 05:04 mitar

There should be support for this feature in S3.putBucketRequestPayment. Is this what you are looking for, or is it not working for you?

lsegal avatar Apr 11 '13 05:04 lsegal

No. Requester Pays buckets are buckets where a person who does getObject pays for it.

mitar avatar Apr 11 '13 05:04 mitar

I made a simple patch which makes it work for me.

mitar avatar Apr 11 '13 05:04 mitar

You are correct that getObject has no parameter to specify the 'x-amz-request-payer' header. That's something that can be easily added (I was writing this as you just did). In the meantime, you can also workaround this by adding the header to the request yourself:

var req = s3.getObject(params);
req.httpRequest.headers['x-amz-request-payer'] = 'requester';
req.on('complete', function (resp) { console.log(resp.data) });
req.send();

lsegal avatar Apr 11 '13 05:04 lsegal

Aha, good, a workaround. :-) Thanks.

mitar avatar Apr 11 '13 05:04 mitar

This was not yet fixed?

mitar avatar Jun 27 '13 11:06 mitar

@mitar Requester pays buckets are now supported in the SDK. Thanks for reporting!

AdityaManohar avatar Mar 24 '15 22:03 AdityaManohar

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

lock[bot] avatar Sep 30 '19 00:09 lock[bot]