1
  • I've created a new identity for AWS SES (email based)

  • Created SMTP Credentials (following link from the account's dashboard) As a result a new SMTP user with "AmazonSesSendingAccess" permissions is created.

  • Used AWS Access Key ID / AWS Secret Access Key from created user into aws configure options Added also a valid region (eu-central-1) and output format as a json.

Code for sending emails is similar to this one:

client = boto3.client('ses', region_name=AWS_REGION)
client.send_email(Destination={...}, Message={...}, ...)

The result I received is always:

 {'Type': 'Sender', 'Code': 'SignatureDoesNotMatch', 'Message': 'The request signature we calculated does not match the signature you provided. Check your A
WS Secret Access Key and signing method. Consult the service documentation for details.'}, 'ResponseMetadata': {'RequestId': 'xxx', 
'HTTPStatusCode': 403, 'HTTPHeaders': {'date': 'Tue, 19 Jul 2022 11:41:43 GMT', 'content-type': 'text/xml', 'content-length': '430', 'connection': 'keep-alive', 'x-a
mzn-requestid': 'xxxx'}, 'RetryAttempts': 0}

I've googled a couple of same issues and found that issue might be with trailing specific symbols like /, +, etc. So, I re-created users till I got an access key and secret key containing ONLY letters and numbers (without any specific symbols), but result is the same.

I've watched video where it works: https://youtu.be/RWxnQW1bU3E?t=690

P.S. I've also seen some information that I shouldn't use SMTP credentials for sending emails, but in video above it works...

Is there any way for more detailed debugging? Or maybe somebody have some thoughts on that?

pythonista
  • 55
  • 1
  • 7

0 Answers0