DEV Community

Discussion on: AWS Lambda: how to detect and stop accidental infinite recursions

Collapse
 
pavelloz profile image
Paweł Kowalski • Edited

When it comes to first example, very simple way of doing it is also using metadata key on s3 object. You can mark files that have been processed, or process only if metadata key is present. This way it always breaks after 1 unnecessary invocation.

Collapse
 
theburningmonk profile image
Yan Cui

Yes, I have used that approach and it works pretty well. But it only works for S3 and a more general-purpose solution is needed when you're working with lots of different event sources.