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

Ability to cache config when using a Closure for AWS credentials #111

Closed stasadev closed 3 years ago

stasadev commented 3 years ago

Hi,

I want to make it work with Laravel Vapor, but the only working way is to use closures because Vapor injects AWS_SESSION_TOKEN in AWS Lambda after the actual deployment.

Vapor uses php artisan config:cache under the hood and any closure in the config throws a LogicException.

I suggest passing the Closure method to aws_credentials as an array, as in the Route facade.

cviebrock commented 3 years ago

Thanks. This has been added to the 8.0.3 release.