Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top