Build a Ride Booking Service in AWS Using Event Sourcing Pattern

Build a Ride Booking Service in AWS Using Event Sourcing Pattern
Build a Ride Booking Service in AWS Using Event Sourcing Pattern

CLOUD LABS



Build a Ride Booking Service in AWS Using Event Sourcing Pattern

In this Cloud Lab, you’ll learn how to build a scalable ride booking app using the event sourcing pattern on AWS. Gain hands-on experience with Kinesis, EventBridge Pipes, Lambda, and DynamoDB.

11 Tasks

intermediate

2hr 30m

Certificate of Completion

Desktop OnlyDevice is not compatible.
No Setup Required
Amazon Web Services

Learning Objectives

An understanding of how the event sourcing pattern captures and processes state changes as events
Hands-on experience filtering and routing events between services using Amazon EventBridge Pipes
Hands-on experience ingesting real-time events with Amazon Kinesis Data Streams
Working knowledge of Kinesis Firehose to stream events to S3 buckets
Hands-on experience using DynamoDB tables in real world applications

Technologies
Kinesis
EventBridge logoEventBridge
Lambda logoLambda
DynamoDB logoDynamoDB
Cloud Lab Overview

Building a modern ride booking service requires more than just storing the “current state” of a ride. To handle high-concurrency requests, maintain a comprehensive audit trail for dispute resolution, and enable real-time tracking, developers are increasingly adopting the event-sourcing pattern.

This Cloud Lab provides a comprehensive, hands-on guide to architecting a serverless ride-booking backend on AWS. You will move beyond traditional CRUD (Create, Read, Update, Delete) and learn how to build a system that treats every action from a ride request to a driver arrival as an immutable event.

What is the event sourcing pattern?

In a traditional database model, if a rider changes their destination, you simply overwrite the old value in the database. In event sourcing, you don’t overwrite anything. Instead, you record a DestinationChanged event.

By storing a sequence of events rather than just the final state, you gain:

  • Temporal querying: Reconstruct exactly what the system looked like at any point in time.

  • Auditability: A built-in, unalterable log of every single user and system action.

  • Scalability: High-speed event ingestion that decouples the write-heavy event log from the read-heavy UI views.

Ride booking service using event sourcing pattern
Ride booking service using event sourcing pattern

Architecture overview: AWS serverless components

In this Cloud Lab, you will build a production-grade pipeline using the core pillars of the AWS serverless ecosystem.

1. Data persistence with DynamoDB

Your application begins with Amazon DynamoDB, where you will manage tables for driver and rider metadata. Because ride-booking involves high-frequency updates, DynamoDB’s low-latency performance is critical for storing the “Materialized Views” (the current status of riders and drivers).

2. High-speed ingestion with Kinesis Data Streams

Every ride request, cancellation, or location update is pushed into Amazon Kinesis Data Streams. This acts as your event store, capturing thousands of events per second with high durability and ordering guarantees.

3. Seamless integration with EventBridge Pipes

To bridge the gap between your stream and your business logic, you will use Amazon EventBridge Pipes. This service acts as the glue, automatically polling your Kinesis stream and routing events to their respective targets without the need for complex poller code.

4. Logic processing with AWS Lambda

The brains of your application reside in AWS Lambda. You will write functions that consume events from EventBridge, process the ride-booking logic (e.g., matching a driver to a rider), and update the state in DynamoDB.

5. Long-term archiving with S3 and Firehose

For compliance and historical analysis, you need a record of every event that has ever occurred. You will configure Amazon Kinesis Data Firehose to stream the event data into an Amazon S3 bucket, creating a cost-effective data lake of ride history.

Why this lab?

Ride-booking services like Uber and Lyft rely on these exact patterns to manage millions of concurrent rides. By completing this Cloud Lab, you’ll gain the specialized knowledge required to build highly resilient, traceable, and scalable distributed systems on AWS.

Cloud Lab Tasks
1.Introduction
Getting Started
2.Build the Ride Booking Service
Create DynamoDB Tables
Create a Kinesis Data Stream
Create the Entry Point Lambda Functions
Create the Event Processing Lambda Functions
Create EventBridge Pipes
3.Build the Event Log Pipeline
Create an S3 Bucket
Create a Firehose Stream
4.Test the Application
Test the Application
5.Conclusion
Clean Up
Wrap Up
Labs Rules Apply
Stay within resource usage requirements.
Do not engage in cryptocurrency mining.
Do not engage in or encourage activity that is illegal.

Relevant Courses

Use the following content to review prerequisites or explore specific concepts in detail.

Hear what others have to say
Join 1.4 million developers working at companies like