In this lab, you learn how to build a scalable, real-time leaderboard for a multiplayer game using Amazon Aurora Serverless and Amazon ElastiCache.

Amazon Aurora is a highly performant, cloud-native relational database offering from AWS that offers both MySQL-compatible and PostgreSQL-compatible editions. The Serverless offering of the Aurora database provides on-demand automatic scaling capabilities as well as the Data API, a fast, secure method for accessing your database over HTTP.

Amazon ElastiCache is a fully managed, in-memory data store service from AWS for use cases that require blazing-fast response times. You can use Redis or Memcached with ElastiCache, and it is commonly used for games, FinTech, and other high-speed applications.

Amazon Aurora Serverless and Amazon ElastiCache are both commonly used individually in game applications. You may want to use them together in your game application to get a combination of top-tier speed of an in-memory cache with the reliability and flexibility of a relational database. In this lab, you use Amazon ElastiCache to perform high-volume, low-latency leaderboard checks for different games, and you use Amazon Aurora Serverless to store all historical data and provide redundancy for the leaderboard data.

Some of the key reasons to use both Amazon Aurora Serverless and Amazon ElastiCache for your game application are:

  • Performance: Both the Redis and Memcached engines from ElastiCache offer supreme performance with sub-millisecond response times with hundreds of thousands of operations per second.
  • Reliability: The Aurora storage layer provides 6-way replication to keep your data safe and protect against data loss.
  • Flexibility: Your cache can be designed for specific access patterns that require extreme performance, while your relational database can be used for more flexible access patterns.

AWS Experience: Intermediate

Time to complete: 3 hours

Cost to complete: This tutorial will cost you less than $2 (assuming all services are running for 3 hours)*

Technologies used:

• Active AWS Account**
• Browser: AWS recommends Chrome
• Amazon Aurora
• Amazon ElastiCache
• AWS Secrets Manager
• Amazon Cloud9
• Amazon Cognito
• AWS Lambda
• Amazon API Gateway
• AWS SDK for Node.js

*This estimate assumes you follow the recommended configurations throughout the tutorial and terminate all resources within 3 hours.

**Accounts that have been created within the last 24 hours might not yet have access to the resources required for this project.