Description
I am experimenting with the ES client in combo with AWS v4 and I use a request to create an index:
client.indices.create(index: index_name, body: INDEX_STRUCTURE)
using the workflow recommended in the README for AWS ES servers (using the Faraday signers). I was receiving an error that the canonical string used for signature generation was not matching the expected one. After some time and after having added some "putsie debugging statements" to the Aws::Signer::V4
I figured that it was getting the URL with a path
having a double slash at the start. This made the index creation request fail. So it looks like the client is sending the request to Faraday with a double-slash at the start of the path, and that works fine with a bare ES, but does not work when you need to use this path to compute a request signature.
I think this might be related to how the -api
gem works, and is probably easy to fix - but I don't currently have time to dive into it myself.