通过 AWS CLI 使用 SES 发送 EC2 电子邮件
我试图弄清楚是否有办法通过 AWS CLI 从 Linux EC2 实例发送 SES 电子邮件。我看了一些例子,说最好使用 SMTP,说 SES 可以工作,但没有详细说明,或者有些例子说这是不可能的。
我已经尝试过:
aws ses send-raw-email --from-arn arn:aws:ec2:<REGION>:<ACCOUNT_ID>:instance/<instance-id> --destinations <list>
但我什么也没得到。
I'm trying to figure out if there is a way to send an SES email from a Linux EC2 instance through AWS CLI. I looked at some examples saying that it's better to use SMTP, saying SES would work but no details behind, or some saying it's not possible.
I have tried this:
aws ses send-raw-email --from-arn arn:aws:ec2:<REGION>:<ACCOUNT_ID>:instance/<instance-id> --destinations <list>
but I didn't get anything.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据 send-raw-email
aws ses send-raw-email help
的帮助页面,参数--from-arn
是已验证的资源名称您在 SES 中配置的身份。更重要的是,它不是您调用 CLI 的 EC2 实例的 ARN。
考虑下面的示例:
--from-arn
,而是使用--source
--from-arn
在这两种情况下,SES已将电子邮件发送至指定目的地。
As per the help page of send-raw-email
aws ses send-raw-email help
, parameter--from-arn
is the resource name of the verified identity you configure in SES.More importantly it is not the ARN of the EC2 instance from which you are invoking the CLI.
Consider the examples below:
--from-arn
, instead using--source
--from-arn
In both cases, SES sent email to the specified destination.