So I am using Laravel Scout in a 5.3 app to connect to AWS ElasticSearch. Everything is connected except when I try to connect to ElasticSearch an extra Basic Auth header is being added even though I am specifying an IAM credentials. Specifically, the error is reads: [Elasticsearch\Common\Exceptions\Forbidden403Exception]
{"message":"'NzA3OTQxMjg4NDc4OkFLSUFJV1gzNUhDMzIyTVczUVpB' not a valid key=value pair (missing equal-sign) in Authorization header: 'Basic NzA3OTQxMjg4NDc4OkFLSUFJV1gzNUhDMzIyTVczUVpB'."}
One side note is I had to downgrade to Laravel Scout 1.1.12 because the elasticsearch driver could not be found by version 2.0, it seems like Taylor is working on this. However, my elasticsearch/elasticsearch package is ^5.0.
This is apparently an ElasticSearch issue with the driver, even using the elasticsearch/elasticsearch package. Switching to Algolia solved the use case and had no issues.