Antonio Mourao
Antonio Mourao

Reputation: 87

Send email with django and AWS SES signature V4

I have a django project and recived an email informing that I should change my ses signature from v2 to v4. I created a new IAM user following this tutorial https://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.html and attach this politics:

`{

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

}`

I´m using this lib https://pypi.org/project/django-ses/, but got this erro message "An error occurred (SignatureDoesNotMatch) when calling the GetSendQuota operation: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details."

In my env vars, I put

AWS_SES_ACCESS_KEY_ID = My Smtp Username that I got when create an SMTP user

AWS_SES_SECRET_ACCESS_KEY = My Smtp Password that I got when create an SMTP user

Someone can help to send an email?

Upvotes: 0

Views: 1045

Answers (1)

Aalok kumar
Aalok kumar

Reputation: 319

The keys to be provided to send Emails are not "SMTP Credentials" . The keys are instead Global access key, Secret access key pair which can be retrieved.

https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-concepts-credentials.html

Upvotes: 2

Related Questions