As a user of this library I would like the option to use a built-in Connection that handles AWS request signing (example here). This would allow a frictionless experience for users of this library whose Elastic Search clusters are hosted in AWS.
In order to make requests to AWS resources such as Elastic Search, the request must include authentication information signed with the users credentials. Specifically, AWS expects the request to adhere to the SigV4 process (reference doc).
For the legacy elasticsearch-js client there was an independent library which added compatibility with AWS Elastic Search. However, I believe it makes sense for a similar client to live within this project given the increasing number of users who utilize AWS ES.
A user who has their Elastic Search cluster hosted in AWS would be able to use the new AWSConnection, which is configured to sign requests as expected by AWS and maintain a consistent experience using this library.
Agreed. I am in the process of porting a service I just wrote back to the legacy library for this precise reason.
The Elasticsearch clients go through rigorous testing and validation against the official Elasticsearch distribution coming from Elastic. Since the AWS Elasticsearch Service has incompatible APIs with Elasticsearch itself, either by missing APIs or has incompatible format, we do not support it. Please consider using Elastic Cloud for an official and formally supported hosted Elasticsearch distribution.