Synchronous Architecture
caller -----> api Gateway ------> lambda ------> DynamoDB
caller call the api -> api calls this lambda ----> that lambda goes to a database DynamoDB
in this case , the caller invoke this api and wait for response during the same invocation
this type of architecture is called synchronous architecture.
example:-
Synchronous flow
Caller
|
| 1. HTTP request
↓
API Gateway
|
| 2. Synchronously invokes
↓
Lambda
|
| 3. Reads/Writes
↓
DynamoDB
|
| 4. Response
↑
Lambda
↑
API Gateway
↑
Caller
What happens step by step?
Suppose the caller sends:
GET /user/123
- Caller → API Gateway**
The caller says:
"Give me the details of user 123."
- API Gateway → Lambda**
API Gateway invokes Lambda synchronously.
Meaning:
"Lambda, execute this function and give me the result."
- Lambda → DynamoDB**
Lambda asks DynamoDB:
"Give me user 123."
- DynamoDB → Lambda**
DynamoDB returns the data.
- Lambda → API Gateway → Caller**
Lambda returns the result, and API Gateway sends it back to the caller.
The important part
Yes, the caller waits for the HTTP response.
So your statement can be improved to:
"In a synchronous architecture, the caller sends a request to API Gateway and waits for the response. API Gateway synchronously invokes Lambda. Lambda processes the request, accesses DynamoDB, and returns the result through API Gateway to the caller as part of the same request-response flow."
Top comments (0)