Download the PHP package jsq/amazon-es-php without Composer
On this page you can find all versions of the php package jsq/amazon-es-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jsq/amazon-es-php
More information about jsq/amazon-es-php
Files in jsq/amazon-es-php
Package amazon-es-php
Short Description Support for using IAM authentication with the official Elasticsearch PHP client
License Apache-2.0
Informations about the package amazon-es-php
AWS Auth Elasticsearch-PHP
NB: SignatureV4 support is built into the Opensearch-PHP client
(opensearch-project/opensearch-php
) as of version 2.0.1.
If you are using the Opensearch-PHP client, you do not need to use this library.
This package provides a signing handler for use with the official
Elasticsearch-PHP client (elasticsearch/elasticsearch
). By default, the handler
will load AWS credentials from the environment and send requestsusing a RingPHP cURL
handler.
The search library package must be installed separately. The documentation below will use Elasticsearch-PHP in the examples, but both libraries should be pretty identical.
Basic Usage
Instances of Aws\ElasticsearchService\ElasticsearchPhpHandler
are callables
that fulfill Elasticsearch-PHP's handler contract. They can be passed to
Elasticsearch\ClientBuilder
's setHandler
method:
Using custom credentials
By default, the handler will attempt to source credentials from the environment as described in the AWS SDK for PHP documentation. To use custom credentials, pass in a credential provider:
Using a custom HTTP handler
By default, the handler will use Elasticsearch\ClientBuilder::defaultHandler()
to dispatch HTTP requests, but this is customizable via an optional constructor
parameter. For example, this repository's tests use a custom handler to mock
network traffic:
Installation
Composer
or