amazon-web-services - 无法使用 SNS 和 Lambda 在 AWS SES 中接收电子邮件

标签 amazon-web-services amazon-ses

我正在尝试使用 SNS 和 Lambda 函数在 SES 中接收电子邮件。

我已验证[email protected]作为 SES 中的电子邮件地址,我创建了一个规则集 [email protected]作为收件人,SNS 主题作为操作。规则集已启用。

Lambda 订阅了 SNS 主题,当我在 AWS 控制台中发送有关该主题的测试消息时,我可以在 CloudWatch 中看到 Lambda 收到了该消息。

但是,当我发送电子邮件至[email protected]时,Lambda 没有收到电子邮件。

有什么想法吗?

下面是一些相关的代码/配置:

  • SES 验证的电子邮件 SES verified email
  • 接收规则操作 Receipt rule action
  • SNS 主题访问政策
{
  "Version": "2008-10-17",
  "Id": "__default_policy_ID",
  "Statement": [
    {
      "Sid": "__default_statement_ID",
      "Effect": "Allow",
      "Principal": {
        "AWS": "*"
      },
      "Action": [
        "SNS:GetTopicAttributes",
        "SNS:SetTopicAttributes",
        "SNS:AddPermission",
        "SNS:RemovePermission",
        "SNS:DeleteTopic",
        "SNS:Subscribe",
        "SNS:ListSubscriptionsByTopic",
        "SNS:Publish",
        "SNS:Receive"
      ],
      "Resource": "arn:aws:sns:eu-west-1:my-account-id:EmailImagesStack-TopicBFC7AF6E-8ZD350QFNU12",
      "Condition": {
        "StringEquals": {
          "AWS:SourceOwner": "my account id"
        }
      }
    }
  ]
}

最佳答案

在 SES 中接收邮件需要一些先决条件,如 here 中所述。 .

  • Verify your domain with Amazon SES by publishing DNS records to prove that you own it.
  • Permit Amazon SES to receive email for your domain by publishing an MX record.
  • Give Amazon SES permission to access other AWS resources in order to execute receipt rule actions.

我猜您没有域名 gmail.com ,因此 SES 无法为您接收来自 <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2f4a574e425f434a6f48424e4643014c4042" rel="noreferrer noopener nofollow">[email protected]</a> 的邮件.

关于amazon-web-services - 无法使用 SNS 和 Lambda 在 AWS SES 中接收电子邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71695417/

相关文章:

amazon-web-services - Amazon Pinpoint 与 Amazon SES/SMS

c# - 通过 amazon ses 发送 html 模板

amazon-web-services - 未收到 Amazon SES 退回通知

android - 在 Android Studio 中使用适用于 Android 的 Amazon Web Service SDK

amazon-web-services - 批量处理AWS Lambda消息

ios - Amazon SQS/SNS 策略错误

amazon-web-services - AWS Neptune 是否需要互联网访问?

php - AWS SES 缺少最终 '@domain' PHP SDK

amazon-web-services - 多项服务 AWS 的 HTTPS

ruby-on-rails-3.1 - ICS 文件的 Amazon SES 附件错误