我正在尝试使用 SNS 和 Lambda 函数在 SES 中接收电子邮件。
我已验证[email protected]作为 SES 中的电子邮件地址,我创建了一个规则集 [email protected]作为收件人,SNS 主题作为操作。规则集已启用。
Lambda 订阅了 SNS 主题,当我在 AWS 控制台中发送有关该主题的测试消息时,我可以在 CloudWatch 中看到 Lambda 收到了该消息。
但是,当我发送电子邮件至[email protected]时,Lambda 没有收到电子邮件。
有什么想法吗?
下面是一些相关的代码/配置:
{
"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/