CreateGameSessionQueue - Amazon GameLift Service
AWS services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with AWS services in China.


Establishes a new queue for processing requests to place new game sessions. A queue identifies where new game sessions can be hosted -- by specifying a list of destinations (fleets or aliases) -- and how long requests can wait in the queue before timing out. You can set up a queue to try to place game sessions on fleets in multiple Regions. To add placement requests to a queue, call StartGameSessionPlacement and reference the queue name.

Destination order. When processing a request for a game session, Amazon GameLift tries each destination in order until it finds one with available resources to host the new game session. A queue's default order is determined by how destinations are listed. The default order is overridden when a game session placement request provides player latency information. Player latency information enables Amazon GameLift to prioritize destinations where players report the lowest average latency, as a result placing the new game session where the majority of players will have the best possible gameplay experience.

Player latency policies. For placement requests containing player latency information, use player latency policies to protect individual players from very high latencies. With a latency cap, even when a destination can deliver a low latency for most players, the game is not placed where any individual player is reporting latency higher than a policy's maximum. A queue can have multiple latency policies, which are enforced consecutively starting with the policy with the lowest latency cap. Use multiple policies to gradually relax latency controls; for example, you might set a policy with a low latency cap for the first 60 seconds, a second policy with a higher cap for the next 60 seconds, etc.

To create a new queue, provide a name, timeout value, a list of destinations and, if desired, a set of latency policies. If successful, a new queue object is returned.

Learn more

Design a Game Session Queue

Create a Game Session Queue

Related operations

Request Syntax

{ "Destinations": [ { "DestinationArn": "string" } ], "Name": "string", "PlayerLatencyPolicies": [ { "MaximumIndividualPlayerLatencyMilliseconds": number, "PolicyDurationSeconds": number } ], "Tags": [ { "Key": "string", "Value": "string" } ], "TimeoutInSeconds": number }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.


In the following list, the required parameters are described first.


A descriptive label that is associated with game session queue. Queue names must be unique within each Region.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [a-zA-Z0-9-]+

Required: Yes


A list of fleets that can be used to fulfill game session placement requests in the queue. Fleets are identified by either a fleet ARN or a fleet alias ARN. Destinations are listed in default preference order.

Type: Array of GameSessionQueueDestination objects

Required: No


A collection of latency policies to apply when processing game sessions placement requests with player latency information. Multiple policies are evaluated in order of the maximum latency value, starting with the lowest latency values. With just one policy, the policy is enforced at the start of the game session placement for the duration period. With multiple policies, each policy is enforced consecutively for its duration period. For example, a queue might enforce a 60-second policy followed by a 120-second policy, and then no policy for the remainder of the placement. A player latency policy must set a value for MaximumIndividualPlayerLatencyMilliseconds. If none is set, this API request fails.

Type: Array of PlayerLatencyPolicy objects

Required: No


A list of labels to assign to the new game session queue resource. Tags are developer-defined key-value pairs. Tagging AWS resources are useful for resource management, access management and cost allocation. For more information, see Tagging AWS Resources in the AWS General Reference. Once the resource is created, you can use TagResource, UntagResource, and ListTagsForResource to add, remove, and view tags. The maximum tag limit may be lower than stated. See the AWS General Reference for actual tagging limits.

Type: Array of Tag objects

Array Members: Minimum number of 0 items. Maximum number of 200 items.

Required: No


The maximum time, in seconds, that a new game session placement request remains in the queue. When a request exceeds this time, the game session placement changes to a TIMED_OUT status.

Type: Integer

Valid Range: Minimum value of 0.

Required: No

Response Syntax

{ "GameSessionQueue": { "Destinations": [ { "DestinationArn": "string" } ], "GameSessionQueueArn": "string", "Name": "string", "PlayerLatencyPolicies": [ { "MaximumIndividualPlayerLatencyMilliseconds": number, "PolicyDurationSeconds": number } ], "TimeoutInSeconds": number } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.


An object that describes the newly created game session queue.

Type: GameSessionQueue object


For information about the errors that are common to all actions, see Common Errors.


The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.

HTTP Status Code: 500


One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.

HTTP Status Code: 400


The requested operation would cause the resource to exceed the allowed service limit. Resolve the issue before retrying.

HTTP Status Code: 400


The requested tagging operation did not succeed. This may be due to invalid tag format or the maximum tag limit may have been exceeded. Resolve the issue before retrying.

HTTP Status Code: 400


The client failed authentication. Clients should not retry such requests.

HTTP Status Code: 400


Create and configure a game session queue

This example creates a new game session queue with destinations in two different Regions. It configures the queue so that requests for new game sessions expire after waiting 10 minutes for placement. The request also configures two latency policies. These are enforced consecutively starting with the one with the lowest maximum latency value. In this example, the 100ms latency cap is enforced during the first 60 seconds of a game session placement, followed by the 200ms cap for rest of the placement duration.

HTTP requests are authenticated using an AWS Signature Version 4 signature in the Authorization header field.

Sample Request

POST / HTTP/1.1 Host:; Accept-Encoding: identity Content-Length: 508 User-Agent: aws-cli/1.11.36 Python/2.7.9 Windows/7 botocore/1.4.93 Content-Type: application/x-amz-json-1.0 Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20170406/us-west-2/gamelift/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY X-Amz-Date: 20170406T004805Z X-Amz-Target: GameLift.CreateGameSessionQueue { "Name": "matchmaker-queue", "Destinations": [ { "DestinationArn": "arn:aws:gamelift:us-west-2::fleet/fleet-1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d" }, { "DestinationArn": "arn:aws:gamelift:us-east-1::fleet/fleet-5c6d3c4d-5e6f-7a8b-9c0d-1e2f3a4b5a2b" } ], "PlayerLatencyPolicies": [ { "MaximumIndividualPlayerLatencyMilliseconds": 200 }, { "MaximumIndividualPlayerLatencyMilliseconds": 100, "PolicyDurationSeconds": 60 } ], "TimeoutInSeconds": 600 }

Sample Response

{ "GameSessionQueue": { "Name": "matchmaker-queue", "GameSessionQueueArn": "arn:aws:gamelift:us-west-2:111122223333:gamesessionqueue/matchmaker-queue", "TimeoutInSeconds": 600, "PlayerLatencyPolicies": [ { "MaximumIndividualPlayerLatencyMilliseconds": 100, "PolicyDurationSeconds": 60 }, { "MaximumIndividualPlayerLatencyMilliseconds": 200 } ] "Destinations": [ {"DestinationArn": "arn:aws:gamelift:us-west-2::fleet/fleet-1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d"}, {"DestinationArn": "arn:aws:gamelift:us-east-1::fleet/fleet-5c6d3c4d-5e6f-7a8b-9c0d-1e2f3a4b5a2b"} ], } }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: