简体   繁体   English

AWS Lambda、SNS 和 SQS Email 系统

[英]AWS Lambda, SNS and SQS Email system

I have a Lambda function that querys a RDS database for email addresses and outputs them into the function log and was wondering if it would be possible to link the Lambda function with an SQS queue so the query results are passed into the queue and then passes them to be used in SNS. I have a Lambda function that querys a RDS database for email addresses and outputs them into the function log and was wondering if it would be possible to link the Lambda function with an SQS queue so the query results are passed into the queue and then passes them用于SNS。

Another Idea i had was passing the results of the Lambda function into another Lambda function which contains a python email script to be used as a variable, i've tried researching this method however have come up with little effective results so if anyone has any idea whether this would be possible it would be a great help. Another Idea i had was passing the results of the Lambda function into another Lambda function which contains a python email script to be used as a variable, i've tried researching this method however have come up with little effective results so if anyone has any idea这是否可能,这将是一个很大的帮助。

I know this might be confusing and vague so if you have any other questions or suggestions please don't hesitate to suggest.我知道这可能会令人困惑和模糊,所以如果您有任何其他问题或建议,请随时提出建议。

You could have the Lambda function place the email addresses (and other relevant information) as individual messages in an SQS queue.您可以让 Lambda function 将 email 地址(和其他相关信息)作为单独的消息放在 SQS 队列中。 Then you could have another Lambda function configured with that SQS queue as an event source, which will iterate over the messages and send the emails, using an email service like Amazon SES to send the emails.然后,您可以将另一个 Lambda function 配置为将该 SQS 队列作为事件源,它将遍历消息并发送电子邮件,使用 email 服务来发送电子邮件。


You mentioned SNS, but it's not clear to me where SNS would fit into this.您提到了 SNS,但我不清楚 SNS 适合在哪里。 SNS is not a good option for sending emails to people, you should use SES instead. SNS 不是向人们发送电子邮件的好选择,您应该改用 SES。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM