ExitSynchronous Communication: the request-response dependency1 / 9
Explanationassociate9 steps · 4 exercises

The price is needed before checkout can continue

How an API Gateway endpoint that invokes Lambda synchronously returns a result the caller needs before continuing, and how waiting ties the caller’s latency and ability to finish to Lambda’s response.

A checkout client asks for a shipping quote because it needs the amount before it can display the order total. In synchronous communication, the work that needs the result waits for the response. The client can still do unrelated work, such as showing a loading indicator.

In this design, an API Gateway REST API uses a Lambda proxy integration. API Gateway waits for the Lambda function to calculate the quote and returns the outcome on the original HTTP request. The client does not have to make a second request to get the quote.

HTTP requestRequestResponse invocationResult or errorHTTP response
Checkout clientUsers
Quote REST APIAmazon API Gateway
Calculate quoteAWS Lambda

Stage 1 of 4: Start at the checkout client: it needs the shipping amount to display the order total.

Next up: Complete the diagram on what you just read.

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.