Search code examples
aws-lambdaamazon-ses

AWS Send Email not authorised for "noreply" emails


Lambda is authorised to send emails to my domain. This works for all email addresses in that domain except for "noreply"

The domain AND noreply email address are verified identities in SES also.

Error message

"User [LAMBDA] is not authorized to perform ses:SendEmail on resource arn:etcetcetc:identity/noreply@example.com}

    sendEmailHandler.addToRolePolicy(
      new iam.PolicyStatement({
        effect: iam.Effect.ALLOW,
        actions: [
          "ses:SendEmail",
          "ses:SendRawEmail",
          "ses:SendTemplatedEmail"
        ],
        resources: [
          `arn:aws:ses:${this.env.region}:${this.env.account}:identity/example.com`
        ]
      })
    );

Solution

  • Changing the resource to :/identity/noreply@example.com works. Maybe this is due to some confusion of identities on AWS when using a domain rather than email address.