Open
Description
I'm using the AWS API Gateway in order to get access to my ES cluster in a VPC and that means using Lambda as well. Lambda has the ability of returning whatever it wants but the plugin is expecting a hash. In my specific case, Lambda is returning a string for the first few calls while it spins up, causing LogStash::Outputs::ElasticSearch.join_bulk_responses
to throw an exception when trying to call fetch
on a string (Line 132 in http_client.rb). The easy fix on my end is to create a JSON object that is similar to what ES would return, but I also think there should be some kind of type checking of the response to allow for a more graceful exception.