lib/fluent/plugin/out_s3.rb in fluent-plugin-s3-0.8.7 vs lib/fluent/plugin/out_s3.rb in fluent-plugin-s3-0.8.8
- old
+ new
@@ -360,10 +360,10 @@
Socket.gethostname
}
end
def check_apikeys
- @bucket.objects(:prefix => @path).first
+ @bucket.objects(:prefix => @path, :max_keys => 1).first
rescue Aws::S3::Errors::NoSuchBucket
# ignore NoSuchBucket Error because ensure_bucket checks it.
rescue => e
raise "can't call S3 API. Please check your credentials or s3_region configuration. error = #{e.inspect}"
end