简体   繁体   English

Amazon SES:用户无权对资源执行“ses:SendEmail”

[英]Amazon SES: User is not authorized to perform `ses:SendEmail' on resource

I've recently setup AWS SES and continue to run into the following error when sending email from a local application.我最近设置了 AWS SES,并在从本地应用程序发送 email 时继续遇到以下错误。

User `arn:aws:iam::REDACTED:user/mail_user' is not authorized to perform `ses:SendEmail' on resource `arn:aws:ses:us-east-1:REDACTED:identity/mail@REDACTED.COM'

I've setup the below policy for the email mail@REDACTED.COM我为 email mail@REDACTED.COM 设置了以下策略

{
    "Version": "2012-10-17",
    "Id": "SampleAuthorizationPolicy",
    "Statement": [
        {
            "Sid": "AuthorizeEmail",
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::REDACTED:user/mail_user"
            },
            "Action": [
                "ses:SendEmail",
                "ses:SendRawEmail"
            ],
            "Resource": "arn:aws:ses:us-east-1:REDACTED:identity/mail@REDACTED.COM"
        }
    ]
}

Any suggestions as to why I'm continuing to receive the unauthorized error?关于为什么我继续收到未经授权的错误的任何建议?

To resolve this issue I created an inline policy for the user via IAM (the permissions tab under the User).为了解决这个问题,我通过 IAM(用户下的权限选项卡)为用户创建了一个内联策略。

I granted the following permissions to resource arn:aws:ses:us-east-1:REDACTED:identity/mail@REDACTED.COM我向资源 arn:aws:ses:us-east-1:REDACTED:identity/mail@REDACTED.COM 授予了以下权限

  • SendEmail发送电子邮件
  • SendRawEmail发送原始电子邮件

I did not need to create an identity policy via the SES management panel.我不需要通过 SES 管理面板创建身份策略。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM