1
votes

I am trying to migrate a Scala application (Play framework) using Sendgrid to Amazon SES. I have a registered domain in SES and am trying to send email via the SMTP interface. I went through the console and generated an IAM user with SMTP username (looks like an Access Key) and SMTP password (Looks like a Secret Key ID). I'm getting 535 Authentication Credentials Invalid.

I read through and converted the Secret Access Key to an Amazon SES SMTP password using the python script at the end of https://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.html. Username as the Access Key like the doc said.

My general question is:

Is my understanding of the format for username and password correct? Username is definitely the Access Key (not IAM user or something else), and the secret key gets converted?

I also tried things like URL encoding the converted password, that still didn't work. Ref: Amazon SES 535 Authentication Credentials Invalid

Here is my configuration:

play.mailer {
    host=email-smtp.us-east-1.amazonaws.com
    port=587
    tls=true
    ssl=false
    auth=true
    user="<WHAT_FORMAT_SHOULD_THIS_BE>>" <--this
    password="<WHAT_FORMAT_SHOULD_THIS_BE>" <--this 
    from="EXAMPLE <[email protected]>"
}
1

1 Answers

1
votes

if you created the credentials directly from the Ses dashboard, then the password does not need to be converted.

It should be used as is.

The conversion is only necessary if you want to use an existing access key and secret key pair

Also keep in mind:

Don't use temporary AWS credentials to derive SMTP credentials. The Amazon SES SMTP interface doesn't support SMTP credentials that have been generated from temporary security credentials.