Search code examples
amazon-web-servicesamazon-ses

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.

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

{
    "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?


Solution

  • To resolve this issue I created an inline policy for the user via IAM (the permissions tab under the User).

    I granted the following permissions to resource 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.