0
有没有办法使用laravel的SQS队列w/out把访问密钥和秘密在配置?即:使用aws凭证文件?我怎样才能使用aws证书文件laravel 5
有没有办法使用laravel的SQS队列w/out把访问密钥和秘密在配置?即:使用aws凭证文件?我怎样才能使用aws证书文件laravel 5
Laravel实例化一个SqsClient
here,通过选项从app/config/queue.php
。
看起来您感兴趣的是'profile'
选项here。
use Aws\Sqs\SqsClient;
$client = SqsClient::factory(array(
'profile' => '<profile in your aws credentials file>',
'region' => '<region name>'
));
在我看来,你应该能够在您的queue config
'sqs' => [
'driver' => 'sqs',
'profile' => '/path/to/your/credeitials/profile/here',
'queue' => 'your-queue-url',
'region' => 'us-east-1',
],
设置
'profile'
选项