Status Code 403: SignatureDoesNotMatch when I use Amazon SAN

I created a new Amazon account. Created SMTP credentials and used the AWS Java SDK to send emails. But it does not work with the following error:

Status code: 403, AWS: AmazonSimpleEmailService, AWS request ID: xyz, AWS Error code: SignatureDoesNotMatch, AWS Error message: The requested signature that we calculated does not match your subscription provided. Verify the AWS passkey and signature method. consult service documentation for details.

+7
source share
2 answers

The keys that must be sent to send emails are not SMTP credentials. The keys instead are the global access key, which can be obtained from http://docs.amazonwebservices.com/ses/latest/GettingStartedGuide/GetAccessIDs.html .

+16
source

SMTP accounts are not valid for use with the SES API (AWS Java SDK). SMTP accounts are actually different from credentials created manually for IAM users, even if they are not visible anywhere in the AWS Console. Take a look here to see the differences: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/using-credentials.html

In fact, you do not need to create global access credentials (this could be a security leak), but you must create a new IAM user with the following security policy and create new credentials for this user.

{ "Version": "2012-10-17", "Statement":[{ "Effect":"Allow", "Action":["ses:SendEmail", "ses:SendRawEmail"], "Resource":"*" } ] } 

PS: Perhaps you could just add the new credentials to the SMTP IAM user already created for SES, but I have not tested this yet.

+6
source

All Articles