Work with the Amazon GameLift Agent and Amazon GameLift Anywhere - Amazon GameLift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Work with the Amazon GameLift Agent and Amazon GameLift Anywhere

The Amazon GameLift Agent is an on-box agent designed to oversee game server processes for game servers that are integrated with Amazon GameLift server SDK 5.x or later. The Amazon GameLift agent provides automated process management, hosting management, and logging.

When deployed to a compute, the Amazon GameLift Agent first completes the following tasks:

  • Registers the compute with an Amazon GameLift Anywhere fleet using the RegisterCompute API.

  • Calls the GetComputeAuthToken API to fetch an authorization token and stores it for use by server processes that are running on the compute.

  • Establishes a WebSocket connection to the Amazon GameLift service.

  • Retrieves the latest version of the fleet's runtime configuration and starts server processes based on the runtime instructions.

Source code and build instructions for the Amazon GameLift Agent are available in the Amazon GameLift Agent GitHub.

About the Agent

The Amazon GameLift Agent registers a compute resource for an existing Amazon GameLift fleet using the RegisterCompute API. The application also calls the GetComputeAuthToken API to fetch an authorization token for the compute resource, using it to make a web socket connection to the Amazon GameLift service.

The Amazon GameLift Agent is designed to handle the following for your fleets:

Process management

  • Starts new server processes as defined in a fleet's RuntimeConfiguration. The Agent periodically requests updated runtime configurations from the Amazon GameLift service.

  • Terminates processes when a process doesn't activate in time.

  • Sends heartbeats to Amazon GameLift. Regular heartbeats are required. If the Agent fails to send heartbeats, the compute might be marked as stale.

  • Reports to Amazon GameLift when a server process terminates.

  • Emits fleet events for processes, including:

    • SERVER_PROCESS_INVALID_PATH: The game server process launch parameters were incorrectly configured.

    • SERVER_PROCESS_TERMINATED_UNHEALTHY: The game server process did not report a valid health check within 3 minutes of activating and was therefore terminated.

    • SERVER_PROCESS_FORCE_TERMINATED: The game server process did not exit cleanly after OnProcessTerminate() was sent within 30 seconds.

    • SERVER_PROCESS_CRASHED: A game server process crashed for some reason.

Host management

  • Receives messages from the Amazon GameLift service to shut down the compute.

  • Triggers the compute to be terminated by Amazon GameLift.

Logging

  • Uploads logs to an Amazon S3 bucket in your Amazon account.