functions is defensive

It is always good to design our functions with the ability to continue from a previous fail point during the next execution.  It is recommended to write the function with proper error handling considering networking outages, reached quota limits, or made any other kind of mistake. All of these issues can affect our function at any time. we need to design our functions to be prepared for such things.

Let assume our code fails after inserting 2000 items into the a queue for processing, we should be able to track the items in a set that is been completed or else we might end up inserting them again. 

How does your code react if a failure occurs after inserting 5,000 of these items into a queue for processing? You should ...

Get DevOps for Serverless Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.