Amazon SES 凭据格式 - 将 Scala 应用程序(Play 框架)从 Sendgrid 迁移到 SES

Amazon SES credentials format - migrating Scala application (Play framework) from Sendgrid to SES

我正在尝试将使用 Sendgrid 的 Scala 应用程序(Play 框架)迁移到 Amazon SES。我在 SES 中有一个注册域,正在尝试通过 SMTP 接口发送电子邮件。我通过控制台生成了一个具有 SMTP 用户名(看起来像访问密钥)和 SMTP 密码(看起来像秘密密钥 ID)的 IAM 用户。 我得到 535 Authentication Credentials Invalid.

我通读了 https://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.html 末尾的 python 脚本并将秘密访问密钥转换为 Amazon SES SMTP 密码。如文档所述,用户名作为访问密钥。

我的一般问题是:

我对用户名和密码格式的理解是否正确?用户名肯定是访问密钥(不是IAM用户或其他什么),密钥被转换?

我也试过 URL 对转换后的密码进行编码,但仍然没有用。参考:Amazon SES 535 Authentication Credentials Invalid

这是我的配置:

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 <noreply@example.com>"
}

如果您直接从 Ses 仪表板创建凭据,则无需转换密码。

应该按原样使用。

仅当您想使用现有的访问密钥和秘密密钥对时才需要进行转换

另请注意:

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.