Can't pass my credentials to AWS PHP SDK

前端 未结 3 1802
梦如初夏
梦如初夏 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:26

    OK, I managed to fix it. I couldn't read the credentials file but it wasn't exactly my idea. What was happening was that the actual client was being created successfully, but the try/catch also had the sendEmail included. This was what was failing. About creating the client with explicit credentials: If you specify region, it will try and read a credentials file.

    About the SendEmail, this is the syntax that worked for me, I'd found another one also in the AWS docs site, and that one failed. It must've been for an older SDK.

提交回复
热议问题