简体   繁体   English

如何在消息到达 SQS 时触发 AWS Lambda(Python),处理后从队列中删除消息?

[英]How to Trigger AWS Lambda(Python) when a message arrives in the SQS,delete the message from the queue after processing?

How to trigger AWS Lambda function(Python) when a message arrives in the SQS, and pass the message to an HTTP Endpoint, after processing the data in the API, delete the message from the SQS queue?如何在消息到达 SQS 时触发 AWS Lambda 函数(Python),并将消息传递给 HTTP Endpoint,在 API 中处理数据后,从 SQS 队列中删除消息? How can I achieve this inside the Python lambda?如何在 Python lambda 中实现这一点?

You can create a SQS trigger on a Lambda function to process the messages off the queue.您可以在 Lambda 函数上创建SQS 触发器来处理队列外的消息。 If the function successfully processes the messages in a batch without any errors, they are deleted from the queue with the right permissions .如果该函数成功地批量处理消息而没有任何错误,则将它们从具有正确权限的队列中删除。

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

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