Multiplayer Session-based Game Hosting on AWS
Publication date: September 1, 2022 (Diagram history)
This architecture enables you to use Amazon GameLift Servers multi-Region fleets and a serverless backend solution to host a session-based multiplayer game.
Multiplayer Session-based Game Hosting on AWS Diagram
-
The game client requests an Amazon Cognito identity and temporary AWS credentials.
-
The client signs a matchmaking request to API Gateway with the temporary credentials. The request includes client latency information to supported AWS Regions.
-
API Gateway calls an AWS Lambda function with player identity information.
-
The Lambda function gets the player skill level from a DynamoDB table.
-
The Lambda function requests matchmaking from Amazon GameLift Servers FlexMatch with player skill and latency data.
-
Amazon GameLift Servers FlexMatch creates a match with multiple players, and an Amazon GameLift Servers queue allocates a session in an Amazon GameLift Serversfleet location based on the latency data.
-
Amazon GameLift Servers FlexMatch publishes an event to Amazon SNS on matchmaking success.
-
Amazon SNS triggers a subscribed Lambda function for ticket processing.
-
The Lambda function stores the ticket result in a DynamoDB table.
-
The game client polls for matchmaking success on a defined interval from API Gateway.
-
The Lambda function checks matchmaking information from the DynamoDB table and informs the client of a successful match by returning server IP, port, and player session ID.
-
The client connects directly to the server and sends the player session ID. The Amazon GameLift Servers Server SDK is used to validate the player session.
-
Game servers send logs and metrics to Amazon CloudWatch with the CloudWatch agent.
Further reading
For additional information, see the following resources:
Diagram history
To be notified about updates to this reference architecture diagram, subscribe to the RSS feed.
| Change | Description | Date |
|---|---|---|
Initial publication | Reference architecture diagram first published. | September 1, 2021 |
Note
To subscribe to RSS updates, you must have an RSS plugin enabled for the browser you are using.