By definition, serverless functions are short-lived and have a maximum lifetime before your platform of choice kills them. At the time of writing, the current limitation for an AWS Lambda function is 300 seconds (5 minutes) and the default 6 seconds. Our example relies on a long-lived process that is continually reading from the Twitter stream and publishing those results to the queue. How then can we accomplish this long-lived behavior with an inherently short-lived system?
To mimic a constantly-running process, we can take advantage of the scheduled invocation of Lambda functions. Other cloud providers should provide similar functionality. In short, we can use the maximum lifetime of ...