AWS::GameLift::GameServerGroup - AWS CloudFormation

AWS::GameLift::GameServerGroup

This operation is used with the Amazon GameLift FleetIQ solution and game server groups.

Creates a GameLift FleetIQ game server group for managing game hosting on a collection of Amazon EC2 instances for game hosting. This operation creates the game server group, creates an Auto Scaling group in your AWS account, and establishes a link between the two groups. You can view the status of your game server groups in the GameLift console. Game server group metrics and events are emitted to Amazon CloudWatch.

Before creating a new game server group, you must have the following:

  • An Amazon EC2 launch template that specifies how to launch Amazon EC2 instances with your game server build. For more information, see Launching an Instance from a Launch Template in the Amazon EC2 User Guide.

  • An IAM role that extends limited access to your AWS account to allow GameLift FleetIQ to create and interact with the Auto Scaling group. For more information, see Create IAM roles for cross-service interaction in the GameLift FleetIQ Developer Guide.

To create a new game server group, specify a unique group name, IAM role and Amazon EC2 launch template, and provide a list of instance types that can be used in the group. You must also set initial maximum and minimum limits on the group's instance count. You can optionally set an Auto Scaling policy with target tracking based on a GameLift FleetIQ metric.

Once the game server group and corresponding Auto Scaling group are created, you have full access to change the Auto Scaling group's configuration as needed. Several properties that are set when creating a game server group, including maximum/minimum size and auto-scaling policy settings, must be updated directly in the Auto Scaling group. Keep in mind that some Auto Scaling group properties are periodically updated by GameLift FleetIQ as part of its balancing activities to optimize for availability and cost.

Learn more

GameLift FleetIQ Guide

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::GameLift::GameServerGroup", "Properties" : { "AutoScalingPolicy" : AutoScalingPolicy, "BalancingStrategy" : String, "DeleteOption" : String, "GameServerGroupName" : String, "GameServerProtectionPolicy" : String, "InstanceDefinitions" : [ InstanceDefinition, ... ], "LaunchTemplate" : LaunchTemplate, "MaxSize" : Double, "MinSize" : Double, "RoleArn" : String, "Tags" : [ Tag, ... ], "VpcSubnets" : [ String, ... ] } }

YAML

Type: AWS::GameLift::GameServerGroup Properties: AutoScalingPolicy: AutoScalingPolicy BalancingStrategy: String DeleteOption: String GameServerGroupName: String GameServerProtectionPolicy: String InstanceDefinitions: - InstanceDefinition LaunchTemplate: LaunchTemplate MaxSize: Double MinSize: Double RoleArn: String Tags: - Tag VpcSubnets: - String

Properties

AutoScalingPolicy

Not currently supported by AWS CloudFormation.

Required: No

Type: AutoScalingPolicy

Update requires: No interruption

BalancingStrategy

Indicates how GameLift FleetIQ balances the use of Spot Instances and On-Demand Instances in the game server group. Method options include the following:

  • SPOT_ONLY - Only Spot Instances are used in the game server group. If Spot Instances are unavailable or not viable for game hosting, the game server group provides no hosting capacity until Spot Instances can again be used. Until then, no new instances are started, and the existing nonviable Spot Instances are terminated (after current gameplay ends) and are not replaced.

  • SPOT_PREFERRED - (default value) Spot Instances are used whenever available in the game server group. If Spot Instances are unavailable, the game server group continues to provide hosting capacity by falling back to On-Demand Instances. Existing nonviable Spot Instances are terminated (after current gameplay ends) and are replaced with new On-Demand Instances.

  • ON_DEMAND_ONLY - Only On-Demand Instances are used in the game server group. No Spot Instances are used, even when available, while this balancing strategy is in force.

Required: No

Type: String

Allowed values: ON_DEMAND_ONLY | SPOT_ONLY | SPOT_PREFERRED

Update requires: No interruption

DeleteOption

Not currently supported by AWS CloudFormation.

Required: No

Type: String

Update requires: No interruption

GameServerGroupName

A developer-defined identifier for the game server group. The name is unique for each Region in each AWS account.

Required: Yes

Type: String

Minimum: 1

Maximum: 128

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

Update requires: No interruption

GameServerProtectionPolicy

A flag that indicates whether instances in the game server group are protected from early termination. Unprotected instances that have active game servers running might be terminated during a scale-down event, causing players to be dropped from the game. Protected instances cannot be terminated while there are active game servers running except in the event of a forced game server group deletion (see ). An exception to this is with Spot Instances, which can be terminated by AWS regardless of protection status.

Required: No

Type: String

Allowed values: FULL_PROTECTION | NO_PROTECTION

Update requires: No interruption

InstanceDefinitions

The set of EC2 instance types that GameLift FleetIQ can use when balancing and automatically scaling instances in the corresponding Auto Scaling group.

Required: Yes

Type: List of InstanceDefinition

Maximum: 20

Update requires: No interruption

LaunchTemplate

Not currently supported by AWS CloudFormation.

Required: Yes

Type: LaunchTemplate

Update requires: No interruption

MaxSize

Not currently supported by AWS CloudFormation.

Required: No

Type: Double

Update requires: No interruption

MinSize

Not currently supported by AWS CloudFormation.

Required: No

Type: Double

Update requires: No interruption

RoleArn

The Amazon Resource Name (ARN) for an IAM role that allows Amazon GameLift to access your EC2 Auto Scaling groups.

Required: Yes

Type: String

Minimum: 1

Maximum: 256

Pattern: ^arn:.*:role\/[\w+=,.@-]+

Update requires: No interruption

Tags

Not currently supported by AWS CloudFormation.

Required: No

Type: List of Tag

Update requires: No interruption

VpcSubnets

Not currently supported by AWS CloudFormation.

Required: No

Type: List of String

Update requires: No interruption

Return values

Ref

Fn::GetAtt

AutoScalingGroupArn

Not currently supported by AWS CloudFormation.

GameServerGroupArn

Not currently supported by AWS CloudFormation.