Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SES AWS Error Code: SignatureDoesNotMatch, Status Code: 403

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?

like image 970
Derek Gardiner Avatar asked Mar 17 '14 15:03

Derek Gardiner


1 Answers

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.

like image 50
Jeremy Lindblom Avatar answered Sep 24 '22 07:09

Jeremy Lindblom