Create a game session queue - Amazon GameLift

Create a game session queue

Queues are used to place new game sessions with the best available hosting resources across multiple fleets and regions. To learn more about building queues for your game, see Design a game session queue.

In a game client, new game sessions are started with queues by using placement requests. Learn more about game session placement in Create game sessions.

When updating the queue destination in a queue, there is a short transition period (up to 30 seconds) during which game sessions placed on the queue destinations may still end up on the old fleet.

Console
  1. In the GameLift Console, in the navigation page, choose Queues.

  2. On the Queues page, choose Create queue.

  3. On the Create queue page, under Queue settings do the following:

    1. For Name, enter a queue name.

    2. For Timeout, enter long you want GameLift to try to place a game session before stopping. GameLift searches for available resources on any fleet until the request times out.

    3. (Optional) For Player latency policies, enter how long GameLift should look for resources within the defined maximum latency. Add additional policies to gradual relax the maximum latency. To add additional policies, choose Add policy.

  4. Under Game session placement locations, select locations to include in the queue. By default All locations are included. All fleets in the queue must have the same certificate configuration. All fleets should be running game builds that are compatible with the game clients using the queue.

  5. Under Destination order, add one or more destinations to the queue.

    1. Choose Add destination.

    2. Select the Location that the destination is in.

    3. Select the type for your destination.

    4. From the resulting list of fleet or alias names, select the one you want to add.

    5. If you have multiple destinations, set the default order by dragging the six dots icon to the left of the destination. GameLift uses this order when searching destinations for available resources to place a new game session.

  6. For Game session placement priority, add and drag the Latency, Cost, Destination, and Location values to define how GameLift prioritizes fleets in your queue. For more information about prioritizing fleets, see Prioritize where game sessions are placed.

  7. Add locations to your Location order and drag them to the priority that the queue should use. If Location is the last priority for game session placement, GameLift uses it as a tiebreaker.

  8. (Optional) Under Event notification settings do the following:

    1. Select or create an SNS topic to receive placement-related event notifications. For more information about event notifications, see Set up event notification for game session placement.

    2. Add Custom event data to append to events created by this queue.

  9. (Optional) Add Tags. For more information about tagging, see Tagging AWS resources.

  10. Choose Create.

AWS CLI

Example Create a queue

The following example creates a game session queue with these configurations:

  • A five minute timeout

  • Two fleet destinations

  • Filters to only allow locations in the us-east-1, us-east-2. us-west-2, and ca-central-1

  • Prioritizes destinations based on cost and then locations in the defined order.

aws gamelift create-game-session-queue \ --name "Sample test queue" --timeout-in-seconds 300 \ --destinations DestinationArn=arn:aws:gamelift:us-east-1::alias/alias-a1234567-b8c9-0d1e-2fa3-b45c6d7e8910 \ DestinationArn=arn:aws:gamelift:us-west-2::alias/alias-b0234567-c8d9-0e1f-2ab3-c45d6e7f8901 \ --filter-configuration "AllowedLocations=us-east-1, ca-central-1, us-east-2, us-west-2" \ --priority-configuration "PriorityOrder=COST,LOCATION LocationOrder=us-east-2,ca-central-1,us-west-2,us-east-1" \ --notification-target "arn:aws:sns:us-west-2:111122223333:My_Placement_SNS_Topic"
Note

You can get fleet and alias ARN values by calling either describe-fleet-attributes or describe-alias with the fleet or alias ID.

If the create-game-session-queue request is successful, GameLift returns a GameSessionQueue object with the new queue configuration. You can now submit requests to the queue using StartGameSessionPlacement.

Example Create a queue with player latency policies

The following example creates a game session queue with these configurations:

  • A ten minute timeout

  • Three fleet destinations

  • A set of player latency policies

aws gamelift create-game-session-queue \ --name "matchmaker-queue" \ --timeout-in-seconds 600 \ --destinations DestinationArn=arn:aws:gamelift:us-east-1::alias/alias-a1234567-b8c9-0d1e-2fa3-b45c6d7e8910 \ DestinationArn=arn:aws:gamelift:us-west-2::alias/alias-b0234567-c8d9-0e1f-2ab3-c45d6e7f8901 \ DestinationArn=arn:aws:gamelift:us-west-2::fleet/fleet-f1234567-b8c9-0d1e-2fa3-b45c6d7e8912 \ --player-latency-policies "MaximumIndividualPlayerLatencyMilliseconds=50,PolicyDurationSeconds=120" \ "MaximumIndividualPlayerLatencyMilliseconds=100,PolicyDurationSeconds=120" \ "MaximumIndividualPlayerLatencyMilliseconds=150" \

If the create-game-session-queue request is successful, GameLift returns a GameSessionQueue object with the new queue configuration.