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

Ravi Sir's Cards › AWS

Order fan-out with SNS+SQS

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

Order fan-out with SNS+SQS One Swiggy-style order must notify email and inventory at the same time without coupling those teams. API → Lambda → SNS topic → two SQS subscriptions (email-q, inventory-q) → each queue has its own Lambda → DynamoDB writes. Create topic, two queues, subscribe each queue to the topic, two worker roles, intake Publish, POST /orders. One POST creates two DynamoDB trails (e
Order fan-out with SNS+SQS · Download PNG
Read card text

What this card says

Why do we need it?

One Swiggy-style order must notify email and inventory at the same time without coupling those teams.

What is it?

API → Lambda → SNS topic → two SQS subscriptions (email-q, inventory-q) → each queue has its own Lambda → DynamoDB writes.

How to do it

Create topic, two queues, subscribe each queue to the topic, two worker roles, intake Publish, POST /orders.

SNS → SQS

Example

One POST creates two DynamoDB trails (email-sent row and inventory-reserved row) from separate workers.

See all AWS revision cards