本文介绍了在Lambda函数中从AWS SES发送电子邮件时访问被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我正在尝试在AWS Lambda函数中使用Amazon SES发送电子邮件,为此,我面临以下错误.

I am trying to send an email using Amazon SES in AWS Lambda function, For this i am facing the following error.

我已授予

推荐答案

所以,我也遇到了Rakesh解释过的相同问题,但是他不明白他说的要这样做的步骤,这里是带有步骤的详细解释

So, I was also having the same problem which Rakesh has explained but couldn't understand the steps he was saying to do so here is a detailed explanation with steps.

您需要执行以下操作安全性,身份和法规遵从性-> IAM->角色->选择您的lambda函数->然后编辑策略->在JSON中打开它并添加以下部分

You need to do the followingSecurity, Identity & Compliance -> IAM -> Roles -> select your lambda function -> then edit policy -> open it in JSON and add the below part

{
  "Effect":"Allow",
  "Action":[
    "ses:SendEmail",
    "ses:SendRawEmail"
  ],
  "Resource":"*"
}

或者您可以根据需要从这些策略示例中进行操作 https://docs.aws.amazon.com/ses/latest/DeveloperGuide/control-user-access.html#iam-and-ses-examples-email -发送动作另外,您需要先验证电子邮件地址,所以不要忘记这一点.希望对大家有帮助.

or you can do as per requirement from these policy examples https://docs.aws.amazon.com/ses/latest/DeveloperGuide/control-user-access.html#iam-and-ses-examples-email-sending-actionsalso, you need to verify the email address first so don't forget that. Hope this helps everyone.

这篇关于在Lambda函数中从AWS SES发送电子邮件时访问被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-08 01:49