3 ms·
But, if you have more than one Lambda working on a single S3 bucket, for example, it's possible to trigger executions infinitely. Edit: my mistake - you still
by nicksergeant 11y ago
But, if you have more than one Lambda working on a single S3 bucket, for example, it's possible to trigger executions infinitely.
Edit: my mistake - you still can't have multiple lambdas operating on a single S3 bucket. I had triggered an infinite loop by manipulating files in the same bucket that it was triggered on (triggering another execution, infinitely).
- helper 11y agoLast time I checked, you could only have one Lambda function attached to bucket events at a time.
- nicksergeant 11y agoYep, but if your lambda creates a new file in that bucket, it'll get called again (as an example). Edit: realized my mistake in the wording of my comment above - _how_ I made the infinite loop had escaped me for a moment.
- res0nat0r 11y agoI believe when you upload your code it will throw an error that your source and destination bucket are the same, which will prevent this type of looping.
- nicksergeant 11y agoThis wasn't the case when I was uploading mine, but maybe they've done some sort of smart checking on the execution role (it'd be pretty hard to detect just by looking at the code, I would think).
- gamache 11y agoThis is not the case. I've written a Lambda which quite purposefully writes to a different path in the source bucket. I have a Lambda for processing large files; the first phase is a single Lambda splitting the file into chunks which can be processed within the 60 second limit, and then the second phase is a bunch of the same Lambdas processing those chunks. (Disclosure: I work with nicksergeant at Localytics.)