Amazon GameLift
Developer Guide (Version )

Set up Fleets

The topics in this section provide help with designing and building a fleet of computing resources that is well-suited to your game. Get help with selecting the right hosting resources, designing how you want to use those resources (by creating a runtime configuration), requesting new fleets and fleet updates, and handling fleet creation issues.

Once you have a fleet up and running, you can add the fleet to a game session queue, create a fleet alias, and manage fleet capacity.

Debug Fleet Creation Issues

This topic provides guidance on the fleet creation process and how to diagnose and resolve common issues that can prevent a fleet from activating.

How Fleet Creation Works

When you create a new fleet, the Amazon GameLift service performs a series of tasks to prepare a single instance based on the fleet's configuration. As each phase of fleet creation is completed, a series of events are emitted for the fleet along with the fleet's current status. You can track all events, including those for fleet creation, using the Amazon GameLift console (see the Fleet detail page, Events tab.

Problems during fleet creation will cause the fleet status to go to Error status with meaningful error messaging. The phase in which fleet creation failed can also be a good indicator. Fleet creation phases are:

  • New – Fleet record is created. Resources are allocated for the initial instance.

  • Downloading – The game build files are downloaded to the instance and extracted.

  • Validating – The downloaded game build files are validated.

  • Building – The game server build is installed on the instance, using an install script if available.

  • Activating – Based on the fleet runtime configuration, server process(es) are started. At least one process must communicate with Amazon GameLift to report its readiness to host a game session.

As soon as one server process notifies Amazon GameLift that it is ready, the fleet status moves to Active.

Common Fleet Creation Problems

Downloading and validating

During this phase, fleet creation may fail if there are issues with the extracted build files, the installation script won't run, or if the executable(s) designated in the runtime configuration is not included in the build files. Amazon GameLift provides logs related to each of these issues.

If the logs do not reveal an issue, it's possible that the problem is due to an internal service error. In this case, try to create the fleet again. If the problem persists, consider re-uploading the game build (in case the files were corrupted). You can also contact Amazon GameLift support or post a question on the forum.

Building

Issues that cause failure during the build phase are almost certainly due to problems with the game build files and/or the installation script. Verify that your game build files, as uploaded to Amazon GameLift, can be installed on a machine running the appropriate operating system. Be sure to use a clean OS installation, not an existing development environment.

Activating

The most common fleet creation problems occur duing the Activating phases. During this phase a number of elements are testing, including the game server's viability, the runtime configuration settings, and the game server's ability to use the Server SDK to interact with the Amazon GameLift service.

These scenarios may help diagnose and solve an activation problem:

  • Server processes fail to start. First check that you've correctly set the launch path and optional launch parameters in the fleet's runtime configuration. You can view the fleet's current runtime configuration using either the Amazon GameLift console (see the Fleet detail page, Capacity allocation) tab or by calling the AWS CLI command describe-runtime-configuration. If the runtime configuration looks correct, check for issues with your game build files and/or installation script.

  • Server processes start but fleet fails to activate. If server processes start and run successfully, but the fleet does not move to Active status, a likely cause is that the server process is failing to notify Amazon GameLift that it is ready to host game sessions. Check that your game server is correctly calling the Server API action ProcessReady() (see Prepare a Server Process).

For additional troubleshooting, you can remotely access a fleet instance. See Remotely Access Fleet Instances.

Server processes start but fail quickly or report poor health. Other than issues with your game build, this outcome can happen when trying to run too many server processes simultaneously on the instance. The optimum number of concurrent processes depends on both the instance type and your game server's resource requirements. Try reducing the number of concurrent processes, which is set in the fleet's runtime configuration, to see if performance improves. You can change a fleet's runtime configuration using either the Amazon GameLift console (edit the fleet's capacity allocation settings) or by calling the AWS CLI command update-runtime-configuration.