dimanche 6 septembre 2015

AWS Lambda and DynamoDB stream. What if execution fail? Will the next attempt process the same record?

I'm creating a Lambda function (JavaScript) that gets exactly one record from several possible DynamoDB stream sources. The function includes a DynamoDB insert on another table, as audit-trail / notification system.

Let's say one execution fail due to throttling (too many inserts per second). As I'm calling context.fail() when the db.putItem fails, I expect that this record will be retried later on another execution. But I'm worried about the ordering.

My question is: Can I be sure that the next lambda execution (executed on the same instance or another) will get THIS errored record to process? And that the next record for the same source will NOT be processed until this one is successfully processed? (I have only this 'reader' for the source streams).

If not, how can I achieve this?

Thanks




Aucun commentaire:

Enregistrer un commentaire