Skip to content

aws-samples/amazon-gamelift-testing-toolkit

Amazon GameLift Testing Toolkit

aws provider Build status

A test harness and visualisation tool for Amazon GameLift and Amazon GameLift FlexMatch. The toolkit lets you visualise your GameLift infrastructure, launch virtual players, and iterate upon your FlexMatch rule sets with the FlexMatch simulator.

📜Documentation

Whether you're starting development of a multiplayer game with dedicated servers, or have already written a game using Amazon GameLift, you can quickly get the Amazon GameLift Testing Toolkit deployed and running.

The quickest way to get started is to build and deploy the toolkit and the sample game, and you can then delete the sample game when you no longer need it.

Prerequisites

Additionally, if you intend to deploy the sample game or create virtual players you will also need:

  • Docker installed and you should be logged in to Docker Hub.

Toolkit Build

dotnet tool install -g Amazon.Lambda.Tools
sudo npm install --global yarn
yarn
yarn build-toolkit

Bootstrap

Before deploying the toolkit, but after building it, you will need to bootstrap the CDK environment as follows:

yarn bootstrap

Toolkit Deployment

If you have configured the AWS CLI with multiple profiles you can pass in a name to choose which profile to target.

yarn deploy-toolkit [--profile <profileName>]

When the deployment completes successfully the terminal will display a number of output variables. Make a note of the value of the AmazonGameLiftTestingToolkit.CloudfrontDomainName variable and the AmazonGameLiftTestingToolkit.userPoolId variable, which you will use in the next stage.

Sample Game

Optionally, if you want to build and deploy the sample game you should run the following commands:

yarn build-sample-game
yarn deploy-sample-game [--profile <profileName>]

First time login

The toolkit uses Amazon Cognito to authenticate and authorize access to its web console, so prior to logging in you will need to create a user in the toolkit's Cognito User Pool.

  1. Login to the AWS Management Console and navigate to Cognito
  2. In the list of User Pools select the User Pool with the userPoolId you previously noted.
  3. In the Users tab, choose Create user.
  4. In Users and groups select Create user and then enter your user details.

Once you've created a user, you can login by navigating to the URL previously noted in the AmazonGameLiftTestingToolkit.CloudfrontDomainName variable.

Other Useful commands

  • yarn delete-toolkit Remove the toolkit from your AWS account
  • yarn delete-sample-game Remove the sample game from your AWS account

Supported Regions for Deployment

The toolkit and sample game can currently be deployed into any of the following regions which support placing a FlexMatch matchmaker. Once deployed, you can add additional locations to your multi-location fleets from any region that GameLift supports.

  • US East (N. Virginia)
  • US West (Oregon)
  • EU Central (Frankfurt)
  • EU West (Ireland)
  • Asia Pacific Southeast (Sydney)
  • Asia Pacific Northeast (Seoul and Tokyo)

Credits

License

This library is licensed under the Apache License, Version 2.0. See the LICENSE file.