Thanks to visit codestin.com
Credit goes to github.com

Skip to content

renoki-co/aws-elastic-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

105 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AWS Elastic Client Handler

CI codecov StyleCI Latest Stable Version Total Downloads Monthly Downloads License

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 [email protected] instead of using the issue tracker.

πŸŽ‰ Credits

About

Just a simple Elasticsearch Client handler that signs the requests for AWS Elasticsearch service with the provided credentials.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors

Languages