AWS Lambda: Synchronous vs Asynchronous Invocation

2024-07-17T03:30:08+00:00

You can invoke a Lambda function in two ways. Synchronous Invocation The first one is called Synchronous invocation, which is the default mode. Synchronous invocation is pretty straightforward. When you invoke a function synchronously, AWS Lambda waits until the function is done processing, then returns the result. Let’s see how this works through the following example: The diagram illustrates a Lambda function-backed API that is managed by API Gateway. When API Gateway receives a GET request from the /getOrder resource, it invokes the getOrder function. The function receives an event containing the payload, processes it, and then returns the result. [...]