You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You are correct. We plan to expand the S3 client to support requester pays as a parameter, but until this happens, you can use a custom handler to add this functionality.
classRequesterPays < Seahorse::Client::Pluginhandler(step: :initialize)do |context|
ifcontext.params.delete(:requester_pays)context.http_request.headers['x-amz-request-payer']='requester'end@handler.call(context)endend# do this once, and all s3 clients will now accept `:requester_pays` to all operationsAws::S3::Client.add_plugin(RequesterPays)s3=Aws::S3::Client.news3.put_object(bucket:'name',key:'key',body:'data',requester_pays:true)
The 88edf93 commit should add support to all of the appropriate object operations that support requester pays. This should go out with our next release.
Hey,
Currently the S3Client doesn't have a switch to include the Request Payer header for downloads as defined here:
http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
The text was updated successfully, but these errors were encountered: