Invocation types

So far, we've learned that Lambda functions are triggered by events. In the next section we'll show you exactly which events are supported as sources, while in this section, we're going to explore the different ways you can invoke a function.

At a high level, Lambda functions can be invoked using the following:

  • A push
  • An event
  • A stream-based model

The push model is a synchronous type of invocation where you make a request for the function to be invoked and then wait for the function to come back with a response. You would typically use this when you need an answer right away, and you might expect some meaningful data in the response. An example of this would be when, paired with a GET method in API gateway, we need the ...

Get Learn AWS Serverless Computing 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.