Closed comath closed 4 years ago
Thank you for your post. If i am understanding it correctly here the ask is to support request pays parameter in list_object_versions
api call. In this case it will be a feature request for service team as we can't add any parameter on the sdk side until service supports it.
Please let me know if i am not understanding it correctly.
The request payer docs says it can be supplied in all S3 calls. If that's the case, the S3 calls that specify it are being redundant Relevant line from https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html:
After you configure a bucket to be a Requester Pays bucket, requesters must include x-amz-request-payer in their requests either in the header, for POST, GET and HEAD requests, or as a parameter in a REST request to show that they understand that they will be charged for the request and the data download.
Currently there is not any s3 api available which supports this parameter to use with SDK. It is an additional header that s3 will evaluate and you can pass this parameter in request header.
Currently this parameter is only available to use with certain cli command like cp
, ls
.
RequestPayer
is valid for list_object_v2
and pretty much all other boto3 S3 calls. According to the RequestPayer
docs is valid for all S3 calls. The only calls where this is a missing option are the list objects calls that can return version info.
Are the RequestPayer
docs wrong?
@comath - Sorry for the confusion. Yes, you are right. This parameter is supported for almost all boto3 s3 calls. But i don't understand why it would be redundant as it is an optional parameter and according to documentation requesters must include x-amz-request-payer in their requests either in the header, for POST, GET and HEAD requests, or as a parameter in a REST request
. So if you are specifying this as a parameter in the request then you don't have to include it in the header.
Awesome. Since it's a valid parameter is it possible to add the parameter to the list_object_versions
call, and the other version-aware calls?
@comath - We can't add any parameter to an api on SDK side, it has to be first supported by s3 service. So in this case whether to add or not to add should be decided by s3 team not us. It will be a feature request for s3. I would recommend contacting the s3 team either on their forum or creating a ticket to AWS Support.
I am closing this issue as this will be a feature request for s3 service team and we can't do anything on the SDK side to fix the issue. Please reopen if you have any concerns.
We have a versioned bucket with requester pays enabled. We'd like to be able to get a list of all versions of objects with the list_object_versions call. Ideally this would be carried up to the paginator.
Currently there's no way to get both version info and provide "requester pays" in boto3, even though
RequestPayer
should be supported for all S3 calls. The only boto3 calls that support it are the ones where the core API documentation mentions it explicitly, which isn't done for any of the calls that return version info of objects.