mailerlite / laravel-elasticsearch

An easy way to use the official Elastic Search client in your Laravel applications.
MIT License
909 stars 187 forks source link

Using AWS instanceProfile #75

Closed giorgiomen closed 4 years ago

giorgiomen commented 4 years ago

Hi, I have an issue using the package in AWS. What if I don't have the key and the secret and I have to use the instanceProfile? Laravel allows using the key "credentials" for the S3 configuration in the config/filesystem.php file, but I'm not able to do the same with this package.

<?php
// config/filesystem.php
$provider = Aws\Credentials\CredentialProvider::instanceProfile();
$memoizedProvider = Aws\Credentials\CredentialProvider::memoize($provider);

return [
.....
's3' => [
    'driver' => 's3',
    'key' => null,
    'secret' => null,
    'credentials' => $memoizedProvider,
    'region' => env('AWS_DEFAULT_REGION'),
    'bucket' => env('AWS_BUCKET'),
    'url' => env('AWS_URL')
]

Can you add a 'aws_credentials' parameter so I can use the instanceProfile? How can I solve this issue? Can you suggest another way?

Thank you Giorgio

cviebrock commented 4 years ago

Merged the PR ... version 4.1.3 should be available shortly. Thanks!