Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cards › AWS

Why an async order API?

What is a VPC: your own private network inside one AWS Region, example ThreeTierVpc 10.0.0.0/16.

Why an async order API? If checkout waits for inventory, fraud checks, and email, the shopper stares at a spinner and retries. Async intake: API accepts the order fast (HTTP 202), puts a message on SQS, and a worker Lambda writes DynamoDB later. Build SQS queue + DynamoDB PK orderId + intake Lambda (SendMessage) + worker Lambda (SQS trigger) + POST /orders. curl POST {
Why an async order API? · Download PNG
Read card text

What this card says

Why do we need it?

If checkout waits for inventory, fraud checks, and email, the shopper stares at a spinner and retries.

What is it?

Async intake: API accepts the order fast (HTTP 202), puts a message on SQS, and a worker Lambda writes DynamoDB later.

How to do it

Build SQS queue + DynamoDB PK orderId + intake Lambda (SendMessage) + worker Lambda (SQS trigger) + POST /orders.

202 Accepted

Example

curl POST {"sku":"TEE-RED","qty":2} returns 202 in ~50 ms; ~2 s later DynamoDB shows status accepted.

See all AWS revision cards