fabschtr/aws-es-php-handler

AWS signing handler for the Elasticsearch-PHP client.

0.0.1 2017-12-24 15:14 UTC

This package is not auto-updated.

Last update: 2024-05-03 00:30:25 UTC


README

Apache 2 License Total Downloads

AWS signing handler for the Elasticsearch-PHP (elasticsearch/elasticsearch) client.

Installation

composer require fabschtr/aws-es-php-handler

Usage

use Elasticsearch\ClientBuilder;
use Fabschtr\AwsEsPhpHandler\AwsElasticsearchPhpHandler;

$handler = new AwsElasticsearchPhpHandler('AWS_KEY', 'AWS_SECRET', 'eu-central-1');

$this->client = ClientBuilder::create()
            ->setHandler($handler)
            ->setHosts('ELASTIC_HOSTS')
            ->build();