Can't pass my credentials to AWS PHP SDK

前端 未结 3 1793
梦如初夏
梦如初夏 2021-01-07 06:55

I installed AWS PHP SDK and am trying to use SES. My problem is that it\'s (apparently) trying to read ~/.aws/credentials no matter what I do. I currently have

3条回答
  •  既然无缘
    2021-01-07 07:28

    The trick is just remove 'profile' => 'default' from the factory params, if this is defined we can't use a custom credentials file or environment variables. Is not documented but just works.

    I'm using Sns and Sdk v3.

     $provider]);
    
    $sns = $sdk->createSns([
    //        'profile' => $profile,
            'region'  => 'us-east-1',
            'version' => 'latest',
    ]);
    

提交回复
热议问题