SES AWS Error Code: SignatureDoesNotMatch, Status Code: 403

匿名 (未验证) 提交于 2019-12-03 08:39:56

问题:

I'm getting a AWS Error Code: SignatureDoesNotMatch, Status Code: 403 when trying to send a mail through Amazon SES.

I have confirmed that I am using the correct credentials which I created via https://console.aws.amazon.com/iam/home?#users and the error still persists.

I assume the credentials I've created on the iam/home are in fact global but I do not know what I am doing wrong further. The entire error is:

AWS Error Code: SignatureDoesNotMatch, Status Code: 403, AWS Request ID: xxx, AWS Error Type: client, AWS Error Message: Signature expired: 20140314T031111Z is now earlier than 20140317T15116Z (20140317T151111Z - 5 min.), User-Agent: aws-sdk-php2/2.5.3 Guzzle/3.8.1 curl/7.22.0 PHP/5.3.10-1ubuntu3.10 thrown in /url/Vendor/Aws/Common/Exception/NamespaceExceptionFactory.php on line 91

The actual code is code I pulled from: http://docs.aws.amazon.com/aws-sdk-php/latest/class-Aws.Ses.SesClient.html#_sendEmail

I am firing this script from my local environment.

Where would I be able to find credentials that would work?

回答1:

This looks like a clock skew issue. The time of the machine you are sending the request from is too different from the Amazon SES server's time. This is causing your signature to be invalid. Your credentials are probably fine. Correct your machine's clock or sync up with an NTP server.



回答2:

Along with this solution I have done the following.

1) I have created the user with PowerUser policy in IAM. 2) Updated the secret/access key in my code.

Now it's working.

Not sure why SMTP credentials(Which are created under SES Dashboard) are not working.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!