Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/renoki-co/aws-elastic-client
Just a simple Elasticsearch Client handler that signs the requests for AWS Elasticsearch service with the provided credentials.
https://github.com/renoki-co/aws-elastic-client
amazon aws client elasticsearch hacktoberfest laravel php service
Last synced: 1 day ago
JSON representation
Just a simple Elasticsearch Client handler that signs the requests for AWS Elasticsearch service with the provided credentials.
- Host: GitHub
- URL: https://github.com/renoki-co/aws-elastic-client
- Owner: renoki-co
- License: apache-2.0
- Created: 2021-03-04T19:48:25.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-10-23T18:10:21.000Z (about 1 year ago)
- Last Synced: 2024-11-09T05:19:45.561Z (6 days ago)
- Topics: amazon, aws, client, elasticsearch, hacktoberfest, laravel, php, service
- Language: PHP
- Homepage:
- Size: 84 KB
- Stars: 7
- Watchers: 3
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
AWS Elastic Client Handler
==========================![CI](https://github.com/renoki-co/aws-elastic-client/workflows/CI/badge.svg?branch=master)
[![codecov](https://codecov.io/gh/renoki-co/aws-elastic-client/branch/master/graph/badge.svg)](https://codecov.io/gh/renoki-co/aws-elastic-client/branch/master)
[![StyleCI](https://github.styleci.io/repos/344591179/shield?branch=master)](https://github.styleci.io/repos/344591179)
[![Latest Stable Version](https://poser.pugx.org/renoki-co/aws-elastic-client/v/stable)](https://packagist.org/packages/renoki-co/aws-elastic-client)
[![Total Downloads](https://poser.pugx.org/renoki-co/aws-elastic-client/downloads)](https://packagist.org/packages/renoki-co/aws-elastic-client)
[![Monthly Downloads](https://poser.pugx.org/renoki-co/aws-elastic-client/d/monthly)](https://packagist.org/packages/renoki-co/aws-elastic-client)
[![License](https://poser.pugx.org/renoki-co/aws-elastic-client/license)](https://packagist.org/packages/renoki-co/aws-elastic-client)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](https://github.com/sponsors/rennokki). 📦**
[](https://github-content.renoki.org/github-repo/18)
## 🚀 Installation
You can install the package via composer:
```bash
composer require renoki-co/aws-elastic-client
```## 🙌 Usage
To authenticate to AWS, you will need to set the handler that comes with this package:
```php
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:
```php
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
``` bash
vendor/bin/phpunit
```## 🤝 Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## 🔒 Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
## 🎉 Credits
- [Alex Renoki](https://github.com/rennokki)
- [All Contributors](../../contributors)