Amazon GameLift
Developer Guide (Version )

Working with Aliases

An Amazon GameLift alias is used to abstract a fleet designation. Fleet designations tell Amazon GameLift where to search for available resources when creating new game sessions for players. By using aliases instead of specific fleet IDs, you can more easily and seamlessly switch player traffic from one fleet to another by changing the alias's target location.

There are two types of routing strategies for aliases:

  • Simple – A simple alias routes player traffic to a specified fleet ID. You can update the fleet ID for an alias at any time.

  • Terminal – A terminal alias does not resolve to a fleet. Instead, it passes a message back to the client. For example, you may want to direct players who are using an out-of-date client to a location where they can get an upgrade.

Fleets have a finite lifespan, and there are several reasons why you'll need to switch out fleets during the life of a game. Specifically, you can't update a fleet's game server build or change certain computing resource attributes (instance types, spot/on-demand usage) on an existing fleet. Instead, you need to create new fleets with the changes and then switch players to the new fleets. With aliases, switching fleets has minimal impact on your game and is invisible to players.

Aliases are primarily useful in games that do not use queues. Switching fleets in a queue is a simple matter of creating a new fleet, adding it to the queue, and removing the old fleet, none of which is visible to players. In contrast, game clients that don't use queues must specify which fleet to use when communicating with the Amazon GameLift service. Without aliases, a fleet switch requires updates to your game code and possibly the need to distribute updated game clients to players. With aliases, you can avoid both.