This is a simplified backend for an e-commerce platform using event-driven architecture in AWS. It processes incoming orders, stores them in DynamoDB, and sends notifications using SNS, SQS, and Lambda.
Event Flow: Client -> SNS: OrderTopic -> SQS: OrderQueue (DLQ configured) -> AWS Lambda: OrderProcessor -> DynamoDB: Orders Table
- Table name:
Orders - Partition key:
orderId(String) - Additional attributes:
userId,itemName,quantity,status,timestamp
- Name:
OrderTopic
OrderQueue(Standard Queue)OrderDLQ(Dead-Letter Queue)- Configure
OrderQueueto send failed messages toOrderDLQafter 3 failed receives
- Add
OrderQueueas a subscriber toOrderTopic
- Name:
OrderProcessor - Runtime: Python 3.12
- Trigger:
OrderQueue - IAM Role: Attach the following policies:
AmazonDynamoDBFullAccessAmazonSQSFullAccess
Copy the lambda code from the text file in this repository and paste it