This is my implementation for the AWS workshop "Build a Real-Time Leaderboard with Amazon Aurora Serverless and Amazon ElastiCache." The goal of this project is to create a scalable, real-time leaderboard system for a multiplayer gaming platform.
The project demos how to use Amazon Aurora Serverless for managing relational data and Amazon ElastiCache for high-speed leaderboard data processing. It uses serverless architecture and AWS services to add scalability, security, and cost efficiency.
- Design a schema for relational data.
- Implement real-time data processing using ElastiCache(for redis)
- Expose APIs for client interaction.
- Authenticate users via Amazon Cognito.
- Test and deploy the application using AWS Lambda and API Gateway.
Technologies Used:
- Amazon Aurora: Handles relational data like user profiles and scores.
- Amazon ElastiCache(for Redis): Stores leaderboard data for real-time performance.
- AWS Lambda: Executes serverless backend logic.
- Amazon API Gateway: Exposes REST APIs.
- Amazon Cognito: Manages user authentication and authorization.
- AWS Secrets Manager: Secures database credentials and sensitive info
- AWS SDK for Node.js: Helps in interacting with AWS services.
If you want to test this, you need the following
- An AWS account with admin permissions.
- AWS CLI installed and configured.
- Node.js installed locally.
-
Clone this repository:
git clone https://github.com/thesarfo/real-time-leaderboard.git cd real-time-leaderboard
-
Deploy the networking and resource setup:
bash scripts/create-networking.sh bash scripts/create-user-pool.sh bash scripts/create-user-pool-client.sh bash scripts/create-lambda.sh bash scripts/create-rest-api.sh
-
Populate the database:
node scripts/createTable.js node scripts/insertGames.js
-
Load Redis data:
node scripts/loadRedis.js
-
Test the setup:
node scripts/testDatabase.js node scripts/testRedis.js
-
Start using the application by calling the APIs.