renoki-co / aws-elastic-client
Just a simple Elasticsearch Client handler that signs the requests for AWS Elasticsearch service with the provided credentials.
Fund package maintenance!
rennokki
Installs: 39 997
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 2
Forks: 7
Open Issues: 6
Requires
- aws/aws-sdk-php: ^3.200
- guzzlehttp/guzzle: ^6.5|^7.3
- guzzlehttp/ring: ^1.1.1
- illuminate/support: ^8.83|^9.0.1
Requires (Dev)
- babenkoivan/elastic-client: ^1.2
- mockery/mockery: ^1.5
- orchestra/testbench: ^6.28|^7.0
- orchestra/testbench-core: ^6.28|^7.0
- phpunit/phpunit: ^9.5.13
- dev-master
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.0
- dev-dependabot/composer/babenkoivan/elastic-client-tw-3.0
- dev-dependabot/composer/mockery/mockery-tw-1.6
- dev-dependabot/github_actions/codecov/codecov-action-5.4.2
- dev-dependabot/github_actions/getong/elasticsearch-action-1.3
- dev-dependabot/github_actions/actions/checkout-4.2.2
- dev-dependabot/github_actions/actions/cache-4.2.3
This package is auto-updated.
Last update: 2025-04-28 20:14:00 UTC
README
Just a simple Elasticsearch Client handler that signs the requests for AWS Elasticsearch service with the provided credentials.
🤝 Supporting
If you are using one or more Renoki Co. open-source packages in your production apps, in presentation demos, hobby projects, school projects or so, sponsor our work with Github Sponsors. 📦
🚀 Installation
You can install the package via composer:
composer require renoki-co/aws-elastic-client
🙌 Usage
To authenticate to AWS, you will need to set the handler that comes with this package:
use RenokiCo\AwsElasticHandler\AwsHandler; $awsHandler = new AwsHandler([ 'enabled' => true, 'aws_access_key_id' => '...', 'aws_secret_access_key' => '...', 'aws_region' => 'us-east-1', 'aws_session_token' => '...', // optional ]); $client = ClientBuilder::create() ->setHosts(...) ->setHandler($awsHandler) ->build();
If you are building th client statically using fromConfig()
, pass the handler
parameter:
use RenokiCo\AwsElasticHandler\AwsHandler; $awsHandler = new AwsHandler([ 'enabled' => true, 'aws_access_key_id' => '...', 'aws_secret_access_key' => '...', 'aws_region' => 'us-east-1', 'aws_session_token' => '...', // optional ]); $client = ClientBuilder::fromConfig([ 'hosts' => [ // ], 'handler' => $awsHandler, ]);
The package will make sure to sign each subsequent request that goes through with the IAM credentials you have provided.
🐛 Testing
vendor/bin/phpunit
🤝 Contributing
Please see CONTRIBUTING for details.
🔒 Security
If you discover any security related issues, please email alex@renoki.org instead of using the issue tracker.