

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::GameLift::Fleet
<a name="aws-resource-gamelift-fleet"></a>

The `AWS::GameLift::Fleet` resource creates an Amazon GameLift (GameLift) fleet to host custom game server or Realtime Servers. A fleet is a set of EC2 instances, configured with instructions to run game servers on each instance.

## Syntax
<a name="aws-resource-gamelift-fleet-syntax"></a>

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

### JSON
<a name="aws-resource-gamelift-fleet-syntax.json"></a>

```
{
  "Type" : "AWS::GameLift::Fleet",
  "Properties" : {
      "[AnywhereConfiguration](#cfn-gamelift-fleet-anywhereconfiguration)" : AnywhereConfiguration,
      "[ApplyCapacity](#cfn-gamelift-fleet-applycapacity)" : String,
      "[BuildId](#cfn-gamelift-fleet-buildid)" : String,
      "[CertificateConfiguration](#cfn-gamelift-fleet-certificateconfiguration)" : CertificateConfiguration,
      "[ComputeType](#cfn-gamelift-fleet-computetype)" : String,
      "[Description](#cfn-gamelift-fleet-description)" : String,
      "[EC2InboundPermissions](#cfn-gamelift-fleet-ec2inboundpermissions)" : [ IpPermission, ... ],
      "[EC2InstanceType](#cfn-gamelift-fleet-ec2instancetype)" : String,
      "[FleetType](#cfn-gamelift-fleet-fleettype)" : String,
      "[InstanceRoleARN](#cfn-gamelift-fleet-instancerolearn)" : String,
      "[InstanceRoleCredentialsProvider](#cfn-gamelift-fleet-instancerolecredentialsprovider)" : String,
      "[Locations](#cfn-gamelift-fleet-locations)" : [ LocationConfiguration, ... ],
      "[MetricGroups](#cfn-gamelift-fleet-metricgroups)" : [ String, ... ],
      "[Name](#cfn-gamelift-fleet-name)" : String,
      "[NewGameSessionProtectionPolicy](#cfn-gamelift-fleet-newgamesessionprotectionpolicy)" : String,
      "[PeerVpcAwsAccountId](#cfn-gamelift-fleet-peervpcawsaccountid)" : String,
      "[PeerVpcId](#cfn-gamelift-fleet-peervpcid)" : String,
      "[PlayerGatewayConfiguration](#cfn-gamelift-fleet-playergatewayconfiguration)" : PlayerGatewayConfiguration,
      "[PlayerGatewayMode](#cfn-gamelift-fleet-playergatewaymode)" : String,
      "[ResourceCreationLimitPolicy](#cfn-gamelift-fleet-resourcecreationlimitpolicy)" : ResourceCreationLimitPolicy,
      "[RuntimeConfiguration](#cfn-gamelift-fleet-runtimeconfiguration)" : RuntimeConfiguration,
      "[ScalingPolicies](#cfn-gamelift-fleet-scalingpolicies)" : [ ScalingPolicy, ... ],
      "[ScriptId](#cfn-gamelift-fleet-scriptid)" : String,
      "[Tags](#cfn-gamelift-fleet-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-gamelift-fleet-syntax.yaml"></a>

```
Type: AWS::GameLift::Fleet
Properties:
  [AnywhereConfiguration](#cfn-gamelift-fleet-anywhereconfiguration): 
    AnywhereConfiguration
  [ApplyCapacity](#cfn-gamelift-fleet-applycapacity): String
  [BuildId](#cfn-gamelift-fleet-buildid): String
  [CertificateConfiguration](#cfn-gamelift-fleet-certificateconfiguration): 
    CertificateConfiguration
  [ComputeType](#cfn-gamelift-fleet-computetype): String
  [Description](#cfn-gamelift-fleet-description): String
  [EC2InboundPermissions](#cfn-gamelift-fleet-ec2inboundpermissions): 
    - IpPermission
  [EC2InstanceType](#cfn-gamelift-fleet-ec2instancetype): String
  [FleetType](#cfn-gamelift-fleet-fleettype): String
  [InstanceRoleARN](#cfn-gamelift-fleet-instancerolearn): String
  [InstanceRoleCredentialsProvider](#cfn-gamelift-fleet-instancerolecredentialsprovider): String
  [Locations](#cfn-gamelift-fleet-locations): 
    - LocationConfiguration
  [MetricGroups](#cfn-gamelift-fleet-metricgroups): 
    - String
  [Name](#cfn-gamelift-fleet-name): String
  [NewGameSessionProtectionPolicy](#cfn-gamelift-fleet-newgamesessionprotectionpolicy): String
  [PeerVpcAwsAccountId](#cfn-gamelift-fleet-peervpcawsaccountid): String
  [PeerVpcId](#cfn-gamelift-fleet-peervpcid): String
  [PlayerGatewayConfiguration](#cfn-gamelift-fleet-playergatewayconfiguration): 
    PlayerGatewayConfiguration
  [PlayerGatewayMode](#cfn-gamelift-fleet-playergatewaymode): String
  [ResourceCreationLimitPolicy](#cfn-gamelift-fleet-resourcecreationlimitpolicy): 
    ResourceCreationLimitPolicy
  [RuntimeConfiguration](#cfn-gamelift-fleet-runtimeconfiguration): 
    RuntimeConfiguration
  [ScalingPolicies](#cfn-gamelift-fleet-scalingpolicies): 
    - ScalingPolicy
  [ScriptId](#cfn-gamelift-fleet-scriptid): String
  [Tags](#cfn-gamelift-fleet-tags): 
    - Tag
```

## Properties
<a name="aws-resource-gamelift-fleet-properties"></a>

`AnywhereConfiguration`  <a name="cfn-gamelift-fleet-anywhereconfiguration"></a>
Amazon GameLift Servers Anywhere configuration options.  
*Required*: No  
*Type*: [AnywhereConfiguration](aws-properties-gamelift-fleet-anywhereconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ApplyCapacity`  <a name="cfn-gamelift-fleet-applycapacity"></a>
Current resource capacity settings for managed EC2 fleets and managed container fleets. For multi-location fleets, location values might refer to a fleet's remote location or its home Region.   
**Returned by:**[DescribeFleetCapacity](https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetCapacity.html), [DescribeFleetLocationCapacity](https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetLocationCapacity.html), [UpdateFleetCapacity](https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateFleetCapacity.html)  
*Required*: No  
*Type*: String  
*Allowed values*: `ON_UPDATE | ON_CREATE_AND_UPDATE | ON_CREATE_AND_UPDATE_WITH_AUTOSCALING`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`BuildId`  <a name="cfn-gamelift-fleet-buildid"></a>
A unique identifier for a build to be deployed on the new fleet. If you are deploying the fleet with a custom game build, you must specify this property. The build must have been successfully uploaded to Amazon GameLift and be in a `READY` status. This fleet setting cannot be changed once the fleet is created.   
*Required*: Conditional  
*Type*: String  
*Pattern*: `^build-\S+|^arn:.*:build/build-\S+`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`CertificateConfiguration`  <a name="cfn-gamelift-fleet-certificateconfiguration"></a>
Prompts Amazon GameLift Servers to generate a TLS/SSL certificate for the fleet. Amazon GameLift Servers uses the certificates to encrypt traffic between game clients and the game servers running on Amazon GameLift Servers. By default, the `CertificateConfiguration` is `DISABLED`. You can't change this property after you create the fleet.   
AWS Certificate Manager (ACM) certificates expire after 13 months. Certificate expiration can cause fleets to fail, preventing players from connecting to instances in the fleet. We recommend you replace fleets before 13 months, consider using fleet aliases for a smooth transition.  
ACM isn't available in all AWS regions. A fleet creation request with certificate generation enabled in an unsupported Region, fails with a 4xx error. For more information about the supported Regions, see [Supported Regions](https://docs.aws.amazon.com/acm/latest/userguide/acm-regions.html) in the *AWS Certificate Manager User Guide*.
*Required*: No  
*Type*: [CertificateConfiguration](aws-properties-gamelift-fleet-certificateconfiguration.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ComputeType`  <a name="cfn-gamelift-fleet-computetype"></a>
The type of compute resource used to host your game servers.   
+ `EC2` – The game server build is deployed to Amazon EC2 instances for cloud hosting. This is the default setting.
+ `ANYWHERE` – Game servers and supporting software are deployed to compute resources that you provide and manage. With this compute type, you can also set the `AnywhereConfiguration` parameter.
*Required*: No  
*Type*: String  
*Allowed values*: `EC2 | ANYWHERE`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Description`  <a name="cfn-gamelift-fleet-description"></a>
A description for the fleet.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EC2InboundPermissions`  <a name="cfn-gamelift-fleet-ec2inboundpermissions"></a>
The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet. Set this parameter for managed EC2 fleets. You can leave this parameter empty when creating the fleet, but you must call [https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateFleetPortSettings](https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateFleetPortSettings) to set it before players can connect to game sessions. As a best practice, we recommend opening ports for remote access only when you need them and closing them when you're finished. For Amazon GameLift Servers Realtime fleets, Amazon GameLift Servers automatically sets TCP and UDP ranges.  
*Required*: No  
*Type*: Array of [IpPermission](aws-properties-gamelift-fleet-ippermission.md)  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EC2InstanceType`  <a name="cfn-gamelift-fleet-ec2instancetype"></a>
The Amazon GameLift Servers-supported Amazon EC2 instance type to use with managed EC2 fleets. Instance type determines the computing resources that will be used to host your game servers, including CPU, memory, storage, and networking capacity. See [Amazon Elastic Compute Cloud Instance Types](https://aws.amazon.com/ec2/instance-types/) for detailed descriptions of Amazon EC2 instance types.  
*Required*: No  
*Type*: String  
*Pattern*: `^.*..*$`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`FleetType`  <a name="cfn-gamelift-fleet-fleettype"></a>
Indicates whether to use On-Demand or Spot instances for this fleet. By default, this property is set to `ON_DEMAND`. Learn more about when to use [ On-Demand versus Spot Instances](https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-ec2-instances.html#gamelift-ec2-instances-spot). This fleet property can't be changed after the fleet is created.  
*Required*: No  
*Type*: String  
*Allowed values*: `ON_DEMAND | SPOT`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`InstanceRoleARN`  <a name="cfn-gamelift-fleet-instancerolearn"></a>
A unique identifier for an IAM role that manages access to your AWS services. With an instance role ARN set, any application that runs on an instance in this fleet can assume the role, including install scripts, server processes, and daemons (background processes). Create a role or look up a role's ARN by using the [IAM dashboard](https://console.aws.amazon.com/iam/) in the AWS Management Console. Learn more about using on-box credentials for your game servers at [ Access external resources from a game server](https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-resources.html). This attribute is used with fleets where `ComputeType` is `EC2`.  
*Required*: No  
*Type*: String  
*Pattern*: `^arn:aws(-.*)?:[a-z-]+:(([a-z]+-)+[0-9])?:([0-9]{12})?:[^.]+$`  
*Minimum*: `1`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`InstanceRoleCredentialsProvider`  <a name="cfn-gamelift-fleet-instancerolecredentialsprovider"></a>
Indicates that fleet instances maintain a shared credentials file for the IAM role defined in `InstanceRoleArn`. Shared credentials allow applications that are deployed with the game server executable to communicate with other AWS resources. This property is used only when the game server is integrated with the server SDK version 5.x. For more information about using shared credentials, see [ Communicate with other AWS resources from your fleets](https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-resources.html). This attribute is used with fleets where `ComputeType` is `EC2`.  
*Required*: No  
*Type*: String  
*Allowed values*: `SHARED_CREDENTIAL_FILE`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Locations`  <a name="cfn-gamelift-fleet-locations"></a>
A set of remote locations to deploy additional instances to and manage as a multi-location fleet. Use this parameter when creating a fleet in AWS Regions that support multiple locations. You can add any AWS Region or Local Zone that's supported by Amazon GameLift Servers. Provide a list of one or more AWS Region codes, such as `us-west-2`, or Local Zone names. When using this parameter, Amazon GameLift Servers requires you to include your home location in the request. For a list of supported Regions and Local Zones, see [ Amazon GameLift Servers service locations](https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-regions.html) for managed hosting.  
*Required*: No  
*Type*: Array of [LocationConfiguration](aws-properties-gamelift-fleet-locationconfiguration.md)  
*Minimum*: `1`  
*Maximum*: `100`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MetricGroups`  <a name="cfn-gamelift-fleet-metricgroups"></a>
The name of an AWS CloudWatch metric group to add this fleet to. A metric group is used to aggregate the metrics for multiple fleets. You can specify an existing metric group name or set a new name to create a new metric group. A fleet can be included in only one metric group at a time.   
*Required*: No  
*Type*: Array of String  
*Maximum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Name`  <a name="cfn-gamelift-fleet-name"></a>
A descriptive label that is associated with a fleet. Fleet names do not need to be unique.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`NewGameSessionProtectionPolicy`  <a name="cfn-gamelift-fleet-newgamesessionprotectionpolicy"></a>
The status of termination protection for active game sessions on the fleet. By default, this property is set to `NoProtection`.  
+ **NoProtection** - Game sessions can be terminated during active gameplay as a result of a scale-down event. 
+ **FullProtection** - Game sessions in `ACTIVE` status cannot be terminated during a scale-down event.
*Required*: No  
*Type*: String  
*Allowed values*: `FullProtection | NoProtection`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PeerVpcAwsAccountId`  <a name="cfn-gamelift-fleet-peervpcawsaccountid"></a>
Used when peering your Amazon GameLift Servers fleet with a VPC, the unique identifier for the AWS account that owns the VPC. You can find your account ID in the AWS Management Console under account settings.   
*Required*: No  
*Type*: String  
*Pattern*: `^[0-9]{12}$`  
*Minimum*: `1`  
*Maximum*: `1024`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`PeerVpcId`  <a name="cfn-gamelift-fleet-peervpcid"></a>
A unique identifier for a VPC with resources to be accessed by your Amazon GameLift Servers fleet. The VPC must be in the same Region as your fleet. To look up a VPC ID, use the [VPC Dashboard](https://console.aws.amazon.com/vpc/) in the AWS Management Console. Learn more about VPC peering in [VPC Peering with Amazon GameLift Servers Fleets](https://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html).  
*Required*: No  
*Type*: String  
*Pattern*: `^vpc-\S+`  
*Minimum*: `1`  
*Maximum*: `1024`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`PlayerGatewayConfiguration`  <a name="cfn-gamelift-fleet-playergatewayconfiguration"></a>
Configuration settings for player gateway. Use this to specify advanced options for how player gateway handles connections.  
*Required*: No  
*Type*: [PlayerGatewayConfiguration](aws-properties-gamelift-fleet-playergatewayconfiguration.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`PlayerGatewayMode`  <a name="cfn-gamelift-fleet-playergatewaymode"></a>
Configures player gateway for your fleet. Player gateway provides benefits such as DDoS protection by rate limiting and validating traﬃc before it reaches game servers, hiding game server IP addresses from players, and providing updated endpoints when relay endpoints become unhealthy. Note, player gateway is only available for fleets using server SDK 5.x or later game server builds.  
**How it works:** When enabled, game clients connect to relay endpoints instead of to your game servers. Player gateway validates player gateway tokens and routes traffic to the appropriate game server. Your game backend calls [GetPlayerConnectionDetails](https://docs.aws.amazon.com/gamelift/latest/apireference/API_GetPlayerConnectionDetails.html) to retrieve relay endpoints and player gateway tokens for your game clients. To learn more about this topic, see [DDoS protection with Amazon GameLift Servers player gateway](https://docs.aws.amazon.com/gameliftservers/latest/developerguide/ddos-protection-intro.html).  
Possible values include:  
+ `DISABLED` (default) -- Game clients connect to the game server endpoint. Use this when you do not intend to integrate your game with player gateway.
+ `ENABLED` -- Player gateway is available in fleet locations where it is supported. Your game backend can call [GetPlayerConnectionDetails](https://docs.aws.amazon.com/gamelift/latest/apireference/API_GetPlayerConnectionDetails.html) to obtain a player gateway token and endpoints for game clients.
+ `REQUIRED` -- Player gateway is available in fleet locations where it is supported, and the fleet can only use locations that support this feature. Attempting to add a remote location to your fleet which does not support player gateway will result in an `InvalidRequestException`.
*Required*: No  
*Type*: String  
*Allowed values*: `DISABLED | ENABLED | REQUIRED`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ResourceCreationLimitPolicy`  <a name="cfn-gamelift-fleet-resourcecreationlimitpolicy"></a>
A policy that limits the number of game sessions that an individual player can create on instances in this fleet within a specified span of time.  
*Required*: No  
*Type*: [ResourceCreationLimitPolicy](aws-properties-gamelift-fleet-resourcecreationlimitpolicy.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RuntimeConfiguration`  <a name="cfn-gamelift-fleet-runtimeconfiguration"></a>
Instructions for how to launch and maintain server processes on instances in the fleet. The runtime configuration defines one or more server process configurations, each identifying a build executable or Realtime script file and the number of processes of that type to run concurrently.   
The `RuntimeConfiguration` parameter is required unless the fleet is being configured using the older parameters `ServerLaunchPath` and `ServerLaunchParameters`, which are still supported for backward compatibility.
*Required*: Conditional  
*Type*: [RuntimeConfiguration](aws-properties-gamelift-fleet-runtimeconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ScalingPolicies`  <a name="cfn-gamelift-fleet-scalingpolicies"></a>
Rule that controls how a fleet is scaled. Scaling policies are uniquely identified by the combination of name and fleet ID.  
*Required*: No  
*Type*: Array of [ScalingPolicy](aws-properties-gamelift-fleet-scalingpolicy.md)  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ScriptId`  <a name="cfn-gamelift-fleet-scriptid"></a>
The unique identifier for a Realtime configuration script to be deployed on fleet instances. You can use either the script ID or ARN. Scripts must be uploaded to Amazon GameLift Servers prior to creating the fleet. This fleet property cannot be changed later.  
You can't use the `!Ref` command to reference a script created with a CloudFormation template for the fleet property `ScriptId`. Instead, use `Fn::GetAtt Script.Arn` or `Fn::GetAtt Script.Id` to retrieve either of these properties as input for `ScriptId`. Alternatively, enter a `ScriptId` string manually.
*Required*: Conditional  
*Type*: String  
*Pattern*: `^script-\S+|^arn:.*:script/script-\S+`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-gamelift-fleet-tags"></a>
A list of labels to assign to the new fleet 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](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) in the *AWS General Reference*.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-gamelift-fleet-tag.md)  
*Maximum*: `200`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-gamelift-fleet-return-values"></a>

### Ref
<a name="aws-resource-gamelift-fleet-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the fleet ID, such as `fleet-1111aaaa-22bb-33cc-44dd-5555eeee66ff`.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-gamelift-fleet-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-gamelift-fleet-return-values-fn--getatt-fn--getatt"></a>

`FleetArn`  <a name="FleetArn-fn::getatt"></a>
The Amazon Resource Name ([ARN](https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html)) that is assigned to a Amazon GameLift Servers fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is `arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912`. In a GameLift fleet ARN, the resource ID matches the `FleetId` value.

`FleetId`  <a name="FleetId-fn::getatt"></a>
A unique identifier for the fleet. 

## Examples
<a name="aws-resource-gamelift-fleet--examples"></a>



**Topics**
+ [Create GameLift fleet with a Build](#aws-resource-gamelift-fleet--examples--Create_GameLift_fleet_with_a_Build)
+ [Create GameLift fleet with a Script](#aws-resource-gamelift-fleet--examples--Create_GameLift_fleet_with_a_Script)

### Create GameLift fleet with a Build
<a name="aws-resource-gamelift-fleet--examples--Create_GameLift_fleet_with_a_Build"></a>

The following example creates and configures a GameLift fleet for a custom game build. The fleet uses a `Ref` intrinsic function to specify a build, which can be declared elsewhere in the same template. The example syntax for log path and server launch path uses values for a Windows build.

Note: the JSON example shows how to escape the slashes (`\\`).

#### JSON
<a name="aws-resource-gamelift-fleet--examples--Create_GameLift_fleet_with_a_Build--json"></a>

```
{
    "Resources": {
        "FleetResource": {
            "Type": "AWS::GameLift::Fleet",
            "Properties": {
                "BuildId": {
                    "Ref": "BuildResource"
                },
                "CertificateConfiguration": {
                    "CertificateType": "DISABLED"
                },
                "Description": "Description of my Fleet",
                "DesiredEC2Instances": 1,
                "EC2InboundPermissions": [
                    {
                        "FromPort": 1234,
                        "ToPort": 1324,
                        "IpRange": "0.0.0.0/24",
                        "Protocol": "TCP"
                    },
                    {
                        "FromPort": 1356,
                        "ToPort": 1578,
                        "IpRange": "192.168.0.0/24",
                        "Protocol": "UDP"
                    }
                ],
                "EC2InstanceType": "c4.large",
                "FleetType": "SPOT",
                "LogPaths": [
                    "c:\\game\\testlog.log",
                    "c:\\game\\testlog2.log"
                ],
                "MetricGroups": [
                    "MetricGroupName"
                ],
                "Name": "MyGameFleet",
                "NewGameSessionProtectionPolicy": "FullProtection",
                "ResourceCreationLimitPolicy": {
                    "NewGameSessionsPerCreator": 5,
                    "PolicyPeriodInMinutes": 2
                },
                "RuntimeConfiguration": {
                    "GameSessionActivationTimeoutSeconds": 300,
                    "MaxConcurrentGameSessionActivations": 1,
                    "ServerProcesses": [
                        {
                            "ConcurrentExecutions": 1,
                            "LaunchPath": "c:\\game\\TestApplicationServer.exe"
                        }
                    ]
                },
                "Locations": [
                  "us-west-2",
                  "us-east-1",
                  "eu-west-1"
                ]
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-gamelift-fleet--examples--Create_GameLift_fleet_with_a_Build--yaml"></a>

```
Resources:
  FleetResource:
    Type: AWS::GameLift::Fleet
    Properties:
      BuildId: !Ref BuildResource
      CertificateConfiguration:
        CertificateType: DISABLED
      Description: Description of my Game Fleet
      DesiredEC2Instances: 1
      EC2InboundPermissions:
        - FromPort: 1234
          ToPort: 1324
          IpRange: 0.0.0.0/24
          Protocol: TCP
        - FromPort: 1356
          ToPort: 1578
          IpRange: 192.168.0.0/24
          Protocol: UDP
      EC2InstanceType: c4.large
      FleetType: SPOT
      LogPaths:
        - c:\game\testlog.log
        - c:\game\testlog2.log
      MetricGroups:
        - MetricGroupName
      Name: MyGameFleet
      NewGameSessionProtectionPolicy: FullProtection
      ResourceCreationLimitPolicy:
        NewGameSessionsPerCreator: 5
        PolicyPeriodInMinutes: 2
      RuntimeConfiguration:
        GameSessionActivationTimeoutSeconds: 300
        MaxConcurrentGameSessionActivations: 1
        ServerProcesses:
          - ConcurrentExecutions: 1
            LaunchPath: c:\game\TestApplicationServer.exe
        Locations:
          - Location: 'us-west-2'
          - Location: 'us-east-1'
          - Location: 'eu-west-1'
```

### Create GameLift fleet with a Script
<a name="aws-resource-gamelift-fleet--examples--Create_GameLift_fleet_with_a_Script"></a>

The following example creates and configures a GameLift fleet to run Realtime Servers. The fleet uses a `GetAtt` intrinsic function to specify a script, which can be declared elsewhere in the same template. Note that the syntax example for the log path and server launch path are for Linux, as all Realtime Servers are deployed with Linux.

#### JSON
<a name="aws-resource-gamelift-fleet--examples--Create_GameLift_fleet_with_a_Script--json"></a>

```
{
    "Resources": {
        "FleetResource": {
            "Type": "AWS::GameLift::Fleet",
            "Properties": {
                "CertificateConfiguration": {
                    "CertificateType": "DISABLED"
                },
                "Description": "Description of my Game Fleet",
                "DesiredEC2Instances": 1,
                "EC2InboundPermissions": [
                    {
                        "FromPort": 1234,
                        "ToPort": 1324,
                        "IpRange": "0.0.0.0/24",
                        "Protocol": "TCP"
                    },
                    {
                        "FromPort": 1356,
                        "ToPort": 1578,
                        "IpRange": "192.168.0.0/24",
                        "Protocol": "UDP"
                    }
                ],
                "EC2InstanceType": "c4.large",
                "FleetType": "SPOT",
                "LogPaths": [
                    "/local/game/testlog.log",
                    "/local/game/testlog2.log"
                ],
                "MetricGroups": [
                    "MetricGroupName"
                ],
                "Name": "MyGameFleet",
                "NewGameSessionProtectionPolicy": "FullProtection",
                "ResourceCreationLimitPolicy": {
                    "NewGameSessionsPerCreator": 5,
                    "PolicyPeriodInMinutes": 2
                },
                "RuntimeConfiguration": {
                    "GameSessionActivationTimeoutSeconds": 300,
                    "MaxConcurrentGameSessionActivations": 1,
                    "ServerProcesses": [
                        {
                            "ConcurrentExecutions": 1,
                            "LaunchPath": "/local/game/myscript.js"
                        }
                    ]
                },
                "ScriptId": {
                    "Fn::GetAtt": [
                        "ScriptResource",
                        "Id"
                    ]
                },
                "Locations": [
                  "us-west-2",
                  "us-east-1",
                  "eu-west-1"
                ]
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-gamelift-fleet--examples--Create_GameLift_fleet_with_a_Script--yaml"></a>

```
Resources:
  FleetResource:
    Type: AWS::GameLift::Fleet
    Properties:
      CertificateConfiguration:
        CertificateType: DISABLED
      Description: Description of my game fleet
      DesiredEC2Instances: 1
      EC2InboundPermissions:
        - FromPort: 1234
          ToPort: 1324
          IpRange: 0.0.0.0/24
          Protocol: TCP
        - FromPort: 1356
          ToPort: 1578
          IpRange: 192.168.0.0/24
          Protocol: UDP
      EC2InstanceType: c4.large
      FleetType: SPOT
      LogPaths:
        - '/local/game/testlog.log'
        - '/local/game/testlog2.log'
      MetricGroups:
        - MetricGroupName
      Name: MyGameFleet
      NewGameSessionProtectionPolicy: FullProtection
      ResourceCreationLimitPolicy:
        NewGameSessionsPerCreator: 5
        PolicyPeriodInMinutes: 2
      RuntimeConfiguration:
        GameSessionActivationTimeoutSeconds: 300
        MaxConcurrentGameSessionActivations: 1
        ServerProcesses:
          - ConcurrentExecutions: 1
            LaunchPath: '/local/game/myscript.js'
      ScriptId: !GetAtt ScriptResource.Id
      Locations:
          - Location: 'us-west-2'
          - Location: 'us-east-1'
          - Location: 'eu-west-1'
```

## See also
<a name="aws-resource-gamelift-fleet--seealso"></a>
+ [ Create GameLift resources using Amazon CloudFront](https://docs.aws.amazon.com/gamelift/latest/developerguide/resources-cloudformation.html) in the *Amazon GameLift Developer Guide*
+ [Setting up GameLift fleets](https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html) in the *Amazon GameLift Developer Guide*
+ [CreateFleet](https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateFleet.html) in the *Amazon GameLift API Reference*



# AWS::GameLift::Fleet AnywhereConfiguration
<a name="aws-properties-gamelift-fleet-anywhereconfiguration"></a>

Amazon GameLift Servers configuration options for your Anywhere fleets.

## Syntax
<a name="aws-properties-gamelift-fleet-anywhereconfiguration-syntax"></a>

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

### JSON
<a name="aws-properties-gamelift-fleet-anywhereconfiguration-syntax.json"></a>

```
{
  "[Cost](#cfn-gamelift-fleet-anywhereconfiguration-cost)" : String
}
```

### YAML
<a name="aws-properties-gamelift-fleet-anywhereconfiguration-syntax.yaml"></a>

```
  [Cost](#cfn-gamelift-fleet-anywhereconfiguration-cost): String
```

## Properties
<a name="aws-properties-gamelift-fleet-anywhereconfiguration-properties"></a>

`Cost`  <a name="cfn-gamelift-fleet-anywhereconfiguration-cost"></a>
The cost to run your fleet per hour. Amazon GameLift Servers uses the provided cost of your fleet to balance usage in queues. For more information about queues, see [Setting up queues](https://docs.aws.amazon.com/gamelift/latest/developerguide/queues-intro.html) in the *Amazon GameLift Servers Developer Guide*.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^\d{1,5}(?:\.\d{1,5})?$`  
*Minimum*: `1`  
*Maximum*: `11`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-gamelift-fleet-anywhereconfiguration--seealso"></a>
+ [ Create GameLift resources using Amazon CloudFront](https://docs.aws.amazon.com/gamelift/latest/developerguide/resources-cloudformation.html) in the *Amazon GameLift Developer Guide*
+ [ Create an Amazon GameLift Anywhere fleet](https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating-anywhere.html) in the *Amazon GameLift Developer Guide*
+ [LocationModel](https://docs.aws.amazon.com/gamelift/latest/apireference/API_LocationModel.html) in the *Amazon GameLift API Reference*



# AWS::GameLift::Fleet CertificateConfiguration
<a name="aws-properties-gamelift-fleet-certificateconfiguration"></a>

Determines whether a TLS/SSL certificate is generated for a fleet. This feature must be enabled when creating the fleet. All instances in a fleet share the same certificate. The certificate can be retrieved by calling the [GameLift Server SDK](https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-serversdk.html) operation `GetInstanceCertificate`. 

## Syntax
<a name="aws-properties-gamelift-fleet-certificateconfiguration-syntax"></a>

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

### JSON
<a name="aws-properties-gamelift-fleet-certificateconfiguration-syntax.json"></a>

```
{
  "[CertificateType](#cfn-gamelift-fleet-certificateconfiguration-certificatetype)" : String
}
```

### YAML
<a name="aws-properties-gamelift-fleet-certificateconfiguration-syntax.yaml"></a>

```
  [CertificateType](#cfn-gamelift-fleet-certificateconfiguration-certificatetype): String
```

## Properties
<a name="aws-properties-gamelift-fleet-certificateconfiguration-properties"></a>

`CertificateType`  <a name="cfn-gamelift-fleet-certificateconfiguration-certificatetype"></a>
Indicates whether a TLS/SSL certificate is generated for a fleet.   
Valid values include:   
+ **GENERATED** - Generate a TLS/SSL certificate for this fleet.
+ **DISABLED** - (default) Do not generate a TLS/SSL certificate for this fleet. 
*Required*: Yes  
*Type*: String  
*Allowed values*: `DISABLED | GENERATED`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## See also
<a name="aws-properties-gamelift-fleet-certificateconfiguration--seealso"></a>
+ [ Create GameLift resources using Amazon CloudFront](https://docs.aws.amazon.com/gamelift/latest/developerguide/resources-cloudformation.html) in the *Amazon GameLift Developer Guide*
+ [Deploy a GameLift fleet for a custom game build](https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating.html) in the *Amazon GameLift Developer Guide*
+ [Deploy a Realtime Servers fleet](https://docs.aws.amazon.com/gamelift/latest/developerguide/realtime-fleets-creating.html) in the *Amazon GameLift Developer Guide*
+ [CertificateConfiguration](https://docs.aws.amazon.com/gamelift/latest/apireference/API_CertificateConfiguration.html) in the *Amazon GameLift API Reference*



# AWS::GameLift::Fleet IpPermission
<a name="aws-properties-gamelift-fleet-ippermission"></a>

A range of IP addresses and port settings that allow inbound traffic to connect to server processes on an instance in a fleet. New game sessions are assigned an IP address/port number combination, which must fall into the fleet's allowed ranges. Fleets with custom game builds must have permissions explicitly set. For Realtime Servers fleets, GameLift automatically opens two port ranges, one for TCP messaging and one for UDP.

## Syntax
<a name="aws-properties-gamelift-fleet-ippermission-syntax"></a>

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

### JSON
<a name="aws-properties-gamelift-fleet-ippermission-syntax.json"></a>

```
{
  "[FromPort](#cfn-gamelift-fleet-ippermission-fromport)" : Integer,
  "[IpRange](#cfn-gamelift-fleet-ippermission-iprange)" : String,
  "[Protocol](#cfn-gamelift-fleet-ippermission-protocol)" : String,
  "[ToPort](#cfn-gamelift-fleet-ippermission-toport)" : Integer
}
```

### YAML
<a name="aws-properties-gamelift-fleet-ippermission-syntax.yaml"></a>

```
  [FromPort](#cfn-gamelift-fleet-ippermission-fromport): Integer
  [IpRange](#cfn-gamelift-fleet-ippermission-iprange): String
  [Protocol](#cfn-gamelift-fleet-ippermission-protocol): String
  [ToPort](#cfn-gamelift-fleet-ippermission-toport): Integer
```

## Properties
<a name="aws-properties-gamelift-fleet-ippermission-properties"></a>

`FromPort`  <a name="cfn-gamelift-fleet-ippermission-fromport"></a>
A starting value for a range of allowed port numbers.  
For fleets using Linux builds, only ports `22` and `1026-60000` are valid.  
For fleets using Windows builds, only ports `1026-60000` are valid.  
*Required*: Yes  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `60000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IpRange`  <a name="cfn-gamelift-fleet-ippermission-iprange"></a>
A range of allowed IP addresses. This value must be expressed in CIDR notation. Example: "`000.000.000.000/[subnet mask]`" or optionally the shortened version "`0.0.0.0/[subnet mask]`".  
*Required*: Yes  
*Type*: String  
*Pattern*: `(^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(/([0-9]|[1-2][0-9]|3[0-2]))$)`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Protocol`  <a name="cfn-gamelift-fleet-ippermission-protocol"></a>
The network communication protocol used by the fleet.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `TCP | UDP`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ToPort`  <a name="cfn-gamelift-fleet-ippermission-toport"></a>
An ending value for a range of allowed port numbers. Port numbers are end-inclusive. This value must be equal to or greater than `FromPort`.  
For fleets using Linux builds, only ports `22` and `1026-60000` are valid.  
For fleets using Windows builds, only ports `1026-60000` are valid.  
*Required*: Yes  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `60000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-gamelift-fleet-ippermission--seealso"></a>
+ [ Create GameLift resources using Amazon CloudFront](https://docs.aws.amazon.com/gamelift/latest/developerguide/resources-cloudformation.html) in the *Amazon GameLift Developer Guide*
+ [Deploy a GameLift fleet for a custom game build](https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating.html) in the *Amazon GameLift Developer Guide*
+ [IpPermission](https://docs.aws.amazon.com/gamelift/latest/apireference/API_IpPermission.html) in the *Amazon GameLift API Reference*



# AWS::GameLift::Fleet LocationCapacity
<a name="aws-properties-gamelift-fleet-locationcapacity"></a>

Current resource capacity settings for managed EC2 fleets and managed container fleets. For multi-location fleets, location values might refer to a fleet's remote location or its home Region. 

**Returned by:**[DescribeFleetCapacity](https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetCapacity.html), [DescribeFleetLocationCapacity](https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetLocationCapacity.html), [UpdateFleetCapacity](https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateFleetCapacity.html)

## Syntax
<a name="aws-properties-gamelift-fleet-locationcapacity-syntax"></a>

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

### JSON
<a name="aws-properties-gamelift-fleet-locationcapacity-syntax.json"></a>

```
{
  "[DesiredEC2Instances](#cfn-gamelift-fleet-locationcapacity-desiredec2instances)" : Integer,
  "[ManagedCapacityConfiguration](#cfn-gamelift-fleet-locationcapacity-managedcapacityconfiguration)" : ManagedCapacityConfiguration,
  "[MaxSize](#cfn-gamelift-fleet-locationcapacity-maxsize)" : Integer,
  "[MinSize](#cfn-gamelift-fleet-locationcapacity-minsize)" : Integer
}
```

### YAML
<a name="aws-properties-gamelift-fleet-locationcapacity-syntax.yaml"></a>

```
  [DesiredEC2Instances](#cfn-gamelift-fleet-locationcapacity-desiredec2instances): Integer
  [ManagedCapacityConfiguration](#cfn-gamelift-fleet-locationcapacity-managedcapacityconfiguration): 
    ManagedCapacityConfiguration
  [MaxSize](#cfn-gamelift-fleet-locationcapacity-maxsize): Integer
  [MinSize](#cfn-gamelift-fleet-locationcapacity-minsize): Integer
```

## Properties
<a name="aws-properties-gamelift-fleet-locationcapacity-properties"></a>

`DesiredEC2Instances`  <a name="cfn-gamelift-fleet-locationcapacity-desiredec2instances"></a>
The number of Amazon EC2 instances you want to maintain in the specified fleet location. This value must fall between the minimum and maximum size limits. Changes in desired instance value can take up to 1 minute to be reflected when viewing the fleet's capacity settings.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ManagedCapacityConfiguration`  <a name="cfn-gamelift-fleet-locationcapacity-managedcapacityconfiguration"></a>
Configuration for Amazon GameLift Servers-managed capacity scaling options.  
*Required*: No  
*Type*: [ManagedCapacityConfiguration](aws-properties-gamelift-fleet-managedcapacityconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaxSize`  <a name="cfn-gamelift-fleet-locationcapacity-maxsize"></a>
The maximum number of instances that are allowed in the specified fleet location. If this parameter is not set, the default is 1.  
*Required*: Yes  
*Type*: Integer  
*Minimum*: `0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MinSize`  <a name="cfn-gamelift-fleet-locationcapacity-minsize"></a>
The minimum number of instances that are allowed in the specified fleet location. If this parameter is not set, the default is 0. This parameter's value will be ignored when using a ManagedCapacityConfiguration where ZeroCapacityStrategy has a value of SCALE\$1TO\$1AND\$1FROM\$1ZERO.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::GameLift::Fleet LocationConfiguration
<a name="aws-properties-gamelift-fleet-locationconfiguration"></a>

A remote location where a multi-location fleet can deploy game servers for game hosting. 

## Syntax
<a name="aws-properties-gamelift-fleet-locationconfiguration-syntax"></a>

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

### JSON
<a name="aws-properties-gamelift-fleet-locationconfiguration-syntax.json"></a>

```
{
  "[Location](#cfn-gamelift-fleet-locationconfiguration-location)" : String,
  "[LocationCapacity](#cfn-gamelift-fleet-locationconfiguration-locationcapacity)" : LocationCapacity,
  "[PlayerGatewayStatus](#cfn-gamelift-fleet-locationconfiguration-playergatewaystatus)" : String
}
```

### YAML
<a name="aws-properties-gamelift-fleet-locationconfiguration-syntax.yaml"></a>

```
  [Location](#cfn-gamelift-fleet-locationconfiguration-location): String
  [LocationCapacity](#cfn-gamelift-fleet-locationconfiguration-locationcapacity): 
    LocationCapacity
  [PlayerGatewayStatus](#cfn-gamelift-fleet-locationconfiguration-playergatewaystatus): String
```

## Properties
<a name="aws-properties-gamelift-fleet-locationconfiguration-properties"></a>

`Location`  <a name="cfn-gamelift-fleet-locationconfiguration-location"></a>
An AWS Region code, such as `us-west-2`. For a list of supported Regions and Local Zones, see [ Amazon GameLift Servers service locations](https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-regions.html) for managed hosting.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^[A-Za-z0-9\-]+`  
*Minimum*: `1`  
*Maximum*: `64`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LocationCapacity`  <a name="cfn-gamelift-fleet-locationconfiguration-locationcapacity"></a>
Current resource capacity settings for managed EC2 fleets and managed container fleets. For multi-location fleets, location values might refer to a fleet's remote location or its home Region.   
**Returned by:**[DescribeFleetCapacity](https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetCapacity.html), [DescribeFleetLocationCapacity](https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeFleetLocationCapacity.html), [UpdateFleetCapacity](https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateFleetCapacity.html)  
*Required*: No  
*Type*: [LocationCapacity](aws-properties-gamelift-fleet-locationcapacity.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PlayerGatewayStatus`  <a name="cfn-gamelift-fleet-locationconfiguration-playergatewaystatus"></a>
The current status of player gateway in this location for this fleet. Note, even if a fleet has PlayerGatewayMode configured as `ENABLED`, player gateway might not be available in a specific location. For more information about locations where player gateway is supported, see [Amazon GameLift Servers service locations](https://docs.aws.amazon.com/gameliftservers/latest/developerguide/gamelift-regions.html).  
Possible values include:  
+ `ENABLED` -- Player gateway is available for this fleet location.
+ `DISABLED` -- Player gateway is not available for this fleet location.
*Required*: No  
*Type*: String  
*Allowed values*: `DISABLED | ENABLED`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::GameLift::Fleet ManagedCapacityConfiguration
<a name="aws-properties-gamelift-fleet-managedcapacityconfiguration"></a>

Use ManagedCapacityConfiguration with the "SCALE\$1TO\$1AND\$1FROM\$1ZERO" ZeroCapacityStrategy to enable Amazon GameLift Servers to fully manage the MinSize value, switching between 0 and 1 based on game session activity. This is ideal for eliminating compute costs during periods of no game activity. It is particularly beneficial during development when you're away from your desk, iterating on builds for extended periods, in production environments serving low-traffic locations, or for games with long, predictable downtime windows. By automatically managing capacity between 0 and 1 instances, you avoid paying for idle instances while maintaining the ability to serve game sessions when demand arrives. Note that while scale-out is triggered immediately upon receiving a game session request, actual game session availability depends on your server process startup time, so this approach works best with multi-location Fleets where cold-start latency is tolerable. With a "MANUAL" ZeroCapacityStrategy Amazon GameLift Servers will not modify Fleet MinSize values automatically and will not scale out from zero instances in response to game sessions. 

## Syntax
<a name="aws-properties-gamelift-fleet-managedcapacityconfiguration-syntax"></a>

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

### JSON
<a name="aws-properties-gamelift-fleet-managedcapacityconfiguration-syntax.json"></a>

```
{
  "[ScaleInAfterInactivityMinutes](#cfn-gamelift-fleet-managedcapacityconfiguration-scaleinafterinactivityminutes)" : Integer,
  "[ZeroCapacityStrategy](#cfn-gamelift-fleet-managedcapacityconfiguration-zerocapacitystrategy)" : String
}
```

### YAML
<a name="aws-properties-gamelift-fleet-managedcapacityconfiguration-syntax.yaml"></a>

```
  [ScaleInAfterInactivityMinutes](#cfn-gamelift-fleet-managedcapacityconfiguration-scaleinafterinactivityminutes): Integer
  [ZeroCapacityStrategy](#cfn-gamelift-fleet-managedcapacityconfiguration-zerocapacitystrategy): String
```

## Properties
<a name="aws-properties-gamelift-fleet-managedcapacityconfiguration-properties"></a>

`ScaleInAfterInactivityMinutes`  <a name="cfn-gamelift-fleet-managedcapacityconfiguration-scaleinafterinactivityminutes"></a>
Length of time, in minutes, that Amazon GameLift Servers will wait before scaling in your MinSize and DesiredInstances to 0 after a period with no game session activity. Default: 30 minutes.  
*Required*: No  
*Type*: Integer  
*Minimum*: `5`  
*Maximum*: `1440`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ZeroCapacityStrategy`  <a name="cfn-gamelift-fleet-managedcapacityconfiguration-zerocapacitystrategy"></a>
The strategy Amazon GameLift Servers will use to automatically scale your capacity to and from zero instances in response to game session activity. Game session activity refers to any active running sessions or game session requests.  
Possible ZeroCapacityStrategy types include:  
+ **MANUAL** -- (default value) Amazon GameLift Servers will not update capacity to and from zero on your behalf.
+ **SCALE\$1TO\$1AND\$1FROM\$1ZERO** -- Amazon GameLift Servers will automatically scale out MinSize and DesiredInstances from 0 to 1 in response to a game session request, and will scale in MinSize and DesiredInstances to 0 after a period with no game session activity. The duration of this scale in period can be configured using ScaleInAfterInactivityMinutes. 
*Required*: Yes  
*Type*: String  
*Allowed values*: `SCALE_TO_AND_FROM_ZERO | MANUAL`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::GameLift::Fleet PlayerGatewayConfiguration
<a name="aws-properties-gamelift-fleet-playergatewayconfiguration"></a>

Configuration settings for player gateway. Use these settings to specify advanced options for how player gateway handles connections.

## Syntax
<a name="aws-properties-gamelift-fleet-playergatewayconfiguration-syntax"></a>

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

### JSON
<a name="aws-properties-gamelift-fleet-playergatewayconfiguration-syntax.json"></a>

```
{
  "[GameServerIpProtocolSupported](#cfn-gamelift-fleet-playergatewayconfiguration-gameserveripprotocolsupported)" : String
}
```

### YAML
<a name="aws-properties-gamelift-fleet-playergatewayconfiguration-syntax.yaml"></a>

```
  [GameServerIpProtocolSupported](#cfn-gamelift-fleet-playergatewayconfiguration-gameserveripprotocolsupported): String
```

## Properties
<a name="aws-properties-gamelift-fleet-playergatewayconfiguration-properties"></a>

`GameServerIpProtocolSupported`  <a name="cfn-gamelift-fleet-playergatewayconfiguration-gameserveripprotocolsupported"></a>
The IP protocol that your game servers support for player connections through player gateway. If the value is set to `IPv4`, GameLift will install and execute a lightweight IP translation software on fleet instances to receive and transform incoming IPv6 traffic to IPv4. If the value is set to `DUAL_STACK`, the lightweight IP translation software will not be installed on fleet instances. `DUAL_STACK` provides slightly better performance than `IPv4`.  
*Required*: No  
*Type*: String  
*Allowed values*: `IPv4 | DUAL_STACK`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::GameLift::Fleet ResourceCreationLimitPolicy
<a name="aws-properties-gamelift-fleet-resourcecreationlimitpolicy"></a>

A policy that limits the number of game sessions a player can create on the same fleet. This optional policy gives game owners control over how players can consume available game server resources. A resource creation policy makes the following statement: "An individual player can create a maximum number of new game sessions within a specified time period".

The policy is evaluated when a player tries to create a new game session. For example, assume you have a policy of 10 new game sessions and a time period of 60 minutes. On receiving a `CreateGameSession` request, Amazon GameLift checks that the player (identified by `CreatorId`) has created fewer than 10 game sessions in the past 60 minutes.

## Syntax
<a name="aws-properties-gamelift-fleet-resourcecreationlimitpolicy-syntax"></a>

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

### JSON
<a name="aws-properties-gamelift-fleet-resourcecreationlimitpolicy-syntax.json"></a>

```
{
  "[NewGameSessionsPerCreator](#cfn-gamelift-fleet-resourcecreationlimitpolicy-newgamesessionspercreator)" : Integer,
  "[PolicyPeriodInMinutes](#cfn-gamelift-fleet-resourcecreationlimitpolicy-policyperiodinminutes)" : Integer
}
```

### YAML
<a name="aws-properties-gamelift-fleet-resourcecreationlimitpolicy-syntax.yaml"></a>

```
  [NewGameSessionsPerCreator](#cfn-gamelift-fleet-resourcecreationlimitpolicy-newgamesessionspercreator): Integer
  [PolicyPeriodInMinutes](#cfn-gamelift-fleet-resourcecreationlimitpolicy-policyperiodinminutes): Integer
```

## Properties
<a name="aws-properties-gamelift-fleet-resourcecreationlimitpolicy-properties"></a>

`NewGameSessionsPerCreator`  <a name="cfn-gamelift-fleet-resourcecreationlimitpolicy-newgamesessionspercreator"></a>
A policy that puts limits on the number of game sessions that a player can create within a specified span of time. With this policy, you can control players' ability to consume available resources.  
The policy is evaluated when a player tries to create a new game session. On receiving a `CreateGameSession` request, Amazon GameLift Servers checks that the player (identified by `CreatorId`) has created fewer than game session limit in the specified time period.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PolicyPeriodInMinutes`  <a name="cfn-gamelift-fleet-resourcecreationlimitpolicy-policyperiodinminutes"></a>
The time span used in evaluating the resource creation limit policy.   
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-gamelift-fleet-resourcecreationlimitpolicy--seealso"></a>
+ [ Create GameLift resources using Amazon CloudFront](https://docs.aws.amazon.com/gamelift/latest/developerguide/resources-cloudformation.html) in the *Amazon GameLift Developer Guide*
+ [ResourceCreationLimitPolicy](https://docs.aws.amazon.com/gamelift/latest/apireference/API_ResourceCreationLimitPolicy.html) in the *Amazon GameLift API Reference*



# AWS::GameLift::Fleet RuntimeConfiguration
<a name="aws-properties-gamelift-fleet-runtimeconfiguration"></a>

A collection of server process configurations that describe the set of processes to run on each instance in a fleet. Server processes run either an executable in a custom game build or a Realtime Servers script. GameLift launches the configured processes, manages their life cycle, and replaces them as needed. Each instance checks regularly for an updated runtime configuration. 

A GameLift instance is limited to 50 processes running concurrently. To calculate the total number of processes in a runtime configuration, add the values of the `ConcurrentExecutions` parameter for each ServerProcess. Learn more about [ Running Multiple Processes on a Fleet](https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-multiprocess.html).

## Syntax
<a name="aws-properties-gamelift-fleet-runtimeconfiguration-syntax"></a>

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

### JSON
<a name="aws-properties-gamelift-fleet-runtimeconfiguration-syntax.json"></a>

```
{
  "[GameSessionActivationTimeoutSeconds](#cfn-gamelift-fleet-runtimeconfiguration-gamesessionactivationtimeoutseconds)" : Integer,
  "[MaxConcurrentGameSessionActivations](#cfn-gamelift-fleet-runtimeconfiguration-maxconcurrentgamesessionactivations)" : Integer,
  "[ServerProcesses](#cfn-gamelift-fleet-runtimeconfiguration-serverprocesses)" : [ ServerProcess, ... ]
}
```

### YAML
<a name="aws-properties-gamelift-fleet-runtimeconfiguration-syntax.yaml"></a>

```
  [GameSessionActivationTimeoutSeconds](#cfn-gamelift-fleet-runtimeconfiguration-gamesessionactivationtimeoutseconds): Integer
  [MaxConcurrentGameSessionActivations](#cfn-gamelift-fleet-runtimeconfiguration-maxconcurrentgamesessionactivations): Integer
  [ServerProcesses](#cfn-gamelift-fleet-runtimeconfiguration-serverprocesses): 
    - ServerProcess
```

## Properties
<a name="aws-properties-gamelift-fleet-runtimeconfiguration-properties"></a>

`GameSessionActivationTimeoutSeconds`  <a name="cfn-gamelift-fleet-runtimeconfiguration-gamesessionactivationtimeoutseconds"></a>
The maximum amount of time (in seconds) allowed to launch a new game session and have it report ready to host players. During this time, the game session is in status `ACTIVATING`. If the game session does not become active before the timeout, it is ended and the game session status is changed to `TERMINATED`.  
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `600`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaxConcurrentGameSessionActivations`  <a name="cfn-gamelift-fleet-runtimeconfiguration-maxconcurrentgamesessionactivations"></a>
The number of game sessions in status `ACTIVATING` to allow on an instance or compute. This setting limits the instance resources that can be used for new game activations at any one time.  
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `2147483647`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ServerProcesses`  <a name="cfn-gamelift-fleet-runtimeconfiguration-serverprocesses"></a>
A collection of server process configurations that identify what server processes to run on fleet computes.  
*Required*: No  
*Type*: Array of [ServerProcess](aws-properties-gamelift-fleet-serverprocess.md)  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-gamelift-fleet-runtimeconfiguration--seealso"></a>
+ [ Create GameLift resources using Amazon CloudFront](https://docs.aws.amazon.com/gamelift/latest/developerguide/resources-cloudformation.html) in the *Amazon GameLift Developer Guide*
+ [Deploy a GameLift fleet for a custom game build](https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating.html) in the *Amazon GameLift Developer Guide*
+ [Deploy a Realtime Servers fleet](https://docs.aws.amazon.com/gamelift/latest/developerguide/realtime-fleets-creating.html) in the *Amazon GameLift Developer Guide*
+ [Run multiple processes on a fleet](https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-multiprocess.html) in the *Amazon GameLift Developer Guide*
+ [RuntimeConfiguration](https://docs.aws.amazon.com/gamelift/latest/apireference/API_RuntimeConfiguration.html) in the *Amazon GameLift API Reference*



# AWS::GameLift::Fleet ScalingPolicy
<a name="aws-properties-gamelift-fleet-scalingpolicy"></a>

Rule that controls how a fleet is scaled. Scaling policies are uniquely identified by the combination of name and fleet ID.

## Syntax
<a name="aws-properties-gamelift-fleet-scalingpolicy-syntax"></a>

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

### JSON
<a name="aws-properties-gamelift-fleet-scalingpolicy-syntax.json"></a>

```
{
  "[ComparisonOperator](#cfn-gamelift-fleet-scalingpolicy-comparisonoperator)" : String,
  "[EvaluationPeriods](#cfn-gamelift-fleet-scalingpolicy-evaluationperiods)" : Integer,
  "[Location](#cfn-gamelift-fleet-scalingpolicy-location)" : String,
  "[MetricName](#cfn-gamelift-fleet-scalingpolicy-metricname)" : String,
  "[Name](#cfn-gamelift-fleet-scalingpolicy-name)" : String,
  "[PolicyType](#cfn-gamelift-fleet-scalingpolicy-policytype)" : String,
  "[ScalingAdjustment](#cfn-gamelift-fleet-scalingpolicy-scalingadjustment)" : Integer,
  "[ScalingAdjustmentType](#cfn-gamelift-fleet-scalingpolicy-scalingadjustmenttype)" : String,
  "[Status](#cfn-gamelift-fleet-scalingpolicy-status)" : String,
  "[TargetConfiguration](#cfn-gamelift-fleet-scalingpolicy-targetconfiguration)" : TargetConfiguration,
  "[Threshold](#cfn-gamelift-fleet-scalingpolicy-threshold)" : Number,
  "[UpdateStatus](#cfn-gamelift-fleet-scalingpolicy-updatestatus)" : String
}
```

### YAML
<a name="aws-properties-gamelift-fleet-scalingpolicy-syntax.yaml"></a>

```
  [ComparisonOperator](#cfn-gamelift-fleet-scalingpolicy-comparisonoperator): String
  [EvaluationPeriods](#cfn-gamelift-fleet-scalingpolicy-evaluationperiods): Integer
  [Location](#cfn-gamelift-fleet-scalingpolicy-location): String
  [MetricName](#cfn-gamelift-fleet-scalingpolicy-metricname): String
  [Name](#cfn-gamelift-fleet-scalingpolicy-name): String
  [PolicyType](#cfn-gamelift-fleet-scalingpolicy-policytype): String
  [ScalingAdjustment](#cfn-gamelift-fleet-scalingpolicy-scalingadjustment): Integer
  [ScalingAdjustmentType](#cfn-gamelift-fleet-scalingpolicy-scalingadjustmenttype): String
  [Status](#cfn-gamelift-fleet-scalingpolicy-status): String
  [TargetConfiguration](#cfn-gamelift-fleet-scalingpolicy-targetconfiguration): 
    TargetConfiguration
  [Threshold](#cfn-gamelift-fleet-scalingpolicy-threshold): Number
  [UpdateStatus](#cfn-gamelift-fleet-scalingpolicy-updatestatus): String
```

## Properties
<a name="aws-properties-gamelift-fleet-scalingpolicy-properties"></a>

`ComparisonOperator`  <a name="cfn-gamelift-fleet-scalingpolicy-comparisonoperator"></a>
Comparison operator to use when measuring a metric against the threshold value.  
*Required*: No  
*Type*: String  
*Allowed values*: `GreaterThanOrEqualToThreshold | GreaterThanThreshold | LessThanThreshold | LessThanOrEqualToThreshold`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EvaluationPeriods`  <a name="cfn-gamelift-fleet-scalingpolicy-evaluationperiods"></a>
Length of time (in minutes) the metric must be at or beyond the threshold before a scaling event is triggered.  
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Location`  <a name="cfn-gamelift-fleet-scalingpolicy-location"></a>
 The fleet location.   
*Required*: No  
*Type*: String  
*Pattern*: `^[A-Za-z0-9\-]+`  
*Minimum*: `1`  
*Maximum*: `64`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MetricName`  <a name="cfn-gamelift-fleet-scalingpolicy-metricname"></a>
Name of the Amazon GameLift Servers-defined metric that is used to trigger a scaling adjustment. For detailed descriptions of fleet metrics, see [Monitor Amazon GameLift Servers with Amazon CloudWatch](https://docs.aws.amazon.com/gamelift/latest/developerguide/monitoring-cloudwatch.html).   
+ **ActivatingGameSessions** -- Game sessions in the process of being created.
+ **ActiveGameSessions** -- Game sessions that are currently running.
+ **ActiveInstances** -- Fleet instances that are currently running at least one game session.
+ **AvailableGameSessions** -- Additional game sessions that fleet could host simultaneously, given current capacity.
+ **AvailablePlayerSessions** -- Empty player slots in currently active game sessions. This includes game sessions that are not currently accepting players. Reserved player slots are not included.
+ **CurrentPlayerSessions** -- Player slots in active game sessions that are being used by a player or are reserved for a player. 
+ **IdleInstances** -- Active instances that are currently hosting zero game sessions. 
+ **PercentAvailableGameSessions** -- Unused percentage of the total number of game sessions that a fleet could host simultaneously, given current capacity. Use this metric for a target-based scaling policy.
+ **PercentIdleInstances** -- Percentage of the total number of active instances that are hosting zero game sessions.
+ **QueueDepth** -- Pending game session placement requests, in any queue, where the current fleet is the top-priority destination.
+ **WaitTime** -- Current wait time for pending game session placement requests, in any queue, where the current fleet is the top-priority destination. 
*Required*: Yes  
*Type*: String  
*Allowed values*: `ActivatingGameSessions | ActiveGameSessions | ActiveInstances | AvailableGameSessions | AvailablePlayerSessions | CurrentPlayerSessions | IdleInstances | PercentAvailableGameSessions | PercentIdleInstances | QueueDepth | WaitTime | ConcurrentActivatableGameSessions`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Name`  <a name="cfn-gamelift-fleet-scalingpolicy-name"></a>
A descriptive label that is associated with a fleet's scaling policy. Policy names do not need to be unique.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PolicyType`  <a name="cfn-gamelift-fleet-scalingpolicy-policytype"></a>
The type of scaling policy to create. For a target-based policy, set the parameter *MetricName* to 'PercentAvailableGameSessions' and specify a *TargetConfiguration*. For a rule-based policy set the following parameters: *MetricName*, *ComparisonOperator*, *Threshold*, *EvaluationPeriods*, *ScalingAdjustmentType*, and *ScalingAdjustment*.  
*Required*: No  
*Type*: String  
*Allowed values*: `RuleBased | TargetBased`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ScalingAdjustment`  <a name="cfn-gamelift-fleet-scalingpolicy-scalingadjustment"></a>
Amount of adjustment to make, based on the scaling adjustment type.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ScalingAdjustmentType`  <a name="cfn-gamelift-fleet-scalingpolicy-scalingadjustmenttype"></a>
The type of adjustment to make to a fleet's instance count.  
+ **ChangeInCapacity** -- add (or subtract) the scaling adjustment value from the current instance count. Positive values scale up while negative values scale down.
+ **ExactCapacity** -- set the instance count to the scaling adjustment value.
+ **PercentChangeInCapacity** -- increase or reduce the current instance count by the scaling adjustment, read as a percentage. Positive values scale up while negative values scale down.
*Required*: No  
*Type*: String  
*Allowed values*: `ChangeInCapacity | ExactCapacity | PercentChangeInCapacity`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Status`  <a name="cfn-gamelift-fleet-scalingpolicy-status"></a>
Current status of the scaling policy. The scaling policy can be in force only when in an `ACTIVE` status. Scaling policies can be suspended for individual fleets. If the policy is suspended for a fleet, the policy status does not change.  
+ **ACTIVE** -- The scaling policy can be used for auto-scaling a fleet.
+ **UPDATE\$1REQUESTED** -- A request to update the scaling policy has been received.
+ **UPDATING** -- A change is being made to the scaling policy.
+ **DELETE\$1REQUESTED** -- A request to delete the scaling policy has been received.
+ **DELETING** -- The scaling policy is being deleted.
+ **DELETED** -- The scaling policy has been deleted.
+ **ERROR** -- An error occurred in creating the policy. It should be removed and recreated.
*Required*: No  
*Type*: String  
*Allowed values*: `ACTIVE | UPDATE_REQUESTED | UPDATING | DELETE_REQUESTED | DELETING | DELETED | ERROR`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TargetConfiguration`  <a name="cfn-gamelift-fleet-scalingpolicy-targetconfiguration"></a>
An object that contains settings for a target-based scaling policy.  
*Required*: No  
*Type*: [TargetConfiguration](aws-properties-gamelift-fleet-targetconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Threshold`  <a name="cfn-gamelift-fleet-scalingpolicy-threshold"></a>
Metric value used to trigger a scaling event.  
*Required*: No  
*Type*: Number  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UpdateStatus`  <a name="cfn-gamelift-fleet-scalingpolicy-updatestatus"></a>
The current status of the fleet's scaling policies in a requested fleet location. The status `PENDING_UPDATE` indicates that an update was requested for the fleet but has not yet been completed for the location.  
*Required*: No  
*Type*: String  
*Allowed values*: `PENDING_UPDATE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::GameLift::Fleet ServerProcess
<a name="aws-properties-gamelift-fleet-serverprocess"></a>

A set of instructions for launching server processes on each instance in a fleet. Server processes run either an executable in a custom game build or a Realtime Servers script. 

## Syntax
<a name="aws-properties-gamelift-fleet-serverprocess-syntax"></a>

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

### JSON
<a name="aws-properties-gamelift-fleet-serverprocess-syntax.json"></a>

```
{
  "[ConcurrentExecutions](#cfn-gamelift-fleet-serverprocess-concurrentexecutions)" : Integer,
  "[LaunchPath](#cfn-gamelift-fleet-serverprocess-launchpath)" : String,
  "[Parameters](#cfn-gamelift-fleet-serverprocess-parameters)" : String
}
```

### YAML
<a name="aws-properties-gamelift-fleet-serverprocess-syntax.yaml"></a>

```
  [ConcurrentExecutions](#cfn-gamelift-fleet-serverprocess-concurrentexecutions): Integer
  [LaunchPath](#cfn-gamelift-fleet-serverprocess-launchpath): String
  [Parameters](#cfn-gamelift-fleet-serverprocess-parameters): String
```

## Properties
<a name="aws-properties-gamelift-fleet-serverprocess-properties"></a>

`ConcurrentExecutions`  <a name="cfn-gamelift-fleet-serverprocess-concurrentexecutions"></a>
The number of server processes using this configuration that run concurrently on each instance or compute.  
*Required*: Yes  
*Type*: Integer  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LaunchPath`  <a name="cfn-gamelift-fleet-serverprocess-launchpath"></a>
The location of a game build executable or Realtime script. Game builds and Realtime scripts are installed on instances at the root:   
+ Windows (custom game builds only): `C:\game`. Example: "`C:\game\MyGame\server.exe`" 
+ Linux: `/local/game`. Examples: "`/local/game/MyGame/server.exe`" or "`/local/game/MyRealtimeScript.js`"
Amazon GameLift Servers doesn't support the use of setup scripts that launch the game executable. For custom game builds, this parameter must indicate the executable that calls the server SDK operations `initSDK()` and `ProcessReady()`. 
*Required*: Yes  
*Type*: String  
*Pattern*: `^([Cc]:\\game\S+|/local/game/\S+)`  
*Minimum*: `1`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Parameters`  <a name="cfn-gamelift-fleet-serverprocess-parameters"></a>
An optional list of parameters to pass to the server executable or Realtime script on launch.  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Pattern: [A-Za-z0-9\$1:.\$1\$1/\$1\$1\$1- =@\$1\$1,?'\$1[\$1]"]\$1  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-gamelift-fleet-serverprocess--seealso"></a>
+ [ Create GameLift resources using Amazon CloudFront](https://docs.aws.amazon.com/gamelift/latest/developerguide/resources-cloudformation.html) in the *Amazon GameLift Developer Guide*
+ [Deploy a GameLift fleet for a custom game build](https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating.html) in the *Amazon GameLift Developer Guide*
+ [Deploy a Realtime Servers fleet](https://docs.aws.amazon.com/gamelift/latest/developerguide/realtime-fleets-creating.html) in the *Amazon GameLift Developer Guide*
+ [Run multiple processes on a fleet](https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-multiprocess.html) in the *Amazon GameLift Developer Guide*
+ [ServerProcess](https://docs.aws.amazon.com/gamelift/latest/apireference/API_ServerProcess.html) in the *Amazon GameLift API Reference*



# AWS::GameLift::Fleet Tag
<a name="aws-properties-gamelift-fleet-tag"></a>

A label that you can assign to a Amazon GameLift Servers resource. 

 **Learn more** 

[Tagging AWS Resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) in the *AWS General Reference*

 [AWS Tagging Strategies](https://aws.amazon.com/answers/account-management/aws-tagging-strategies/) 

 **Related actions** 

 [All APIs by task](https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-awssdk.html#reference-awssdk-resources-fleets) 

## Syntax
<a name="aws-properties-gamelift-fleet-tag-syntax"></a>

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

### JSON
<a name="aws-properties-gamelift-fleet-tag-syntax.json"></a>

```
{
  "[Key](#cfn-gamelift-fleet-tag-key)" : String,
  "[Value](#cfn-gamelift-fleet-tag-value)" : String
}
```

### YAML
<a name="aws-properties-gamelift-fleet-tag-syntax.yaml"></a>

```
  [Key](#cfn-gamelift-fleet-tag-key): String
  [Value](#cfn-gamelift-fleet-tag-value): String
```

## Properties
<a name="aws-properties-gamelift-fleet-tag-properties"></a>

`Key`  <a name="cfn-gamelift-fleet-tag-key"></a>
The key for a developer-defined key value pair for tagging an AWS resource.   
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-gamelift-fleet-tag-value"></a>
The value for a developer-defined key value pair for tagging an AWS resource.   
*Required*: Yes  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::GameLift::Fleet TargetConfiguration
<a name="aws-properties-gamelift-fleet-targetconfiguration"></a>

Settings for a target-based scaling policy. A target-based policy tracks a particular fleet metric specifies a target value for the metric. As player usage changes, the policy triggers Amazon GameLift Servers to adjust capacity so that the metric returns to the target value. The target configuration specifies settings as needed for the target based policy, including the target value. 

## Syntax
<a name="aws-properties-gamelift-fleet-targetconfiguration-syntax"></a>

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

### JSON
<a name="aws-properties-gamelift-fleet-targetconfiguration-syntax.json"></a>

```
{
  "[TargetValue](#cfn-gamelift-fleet-targetconfiguration-targetvalue)" : Number
}
```

### YAML
<a name="aws-properties-gamelift-fleet-targetconfiguration-syntax.yaml"></a>

```
  [TargetValue](#cfn-gamelift-fleet-targetconfiguration-targetvalue): Number
```

## Properties
<a name="aws-properties-gamelift-fleet-targetconfiguration-properties"></a>

`TargetValue`  <a name="cfn-gamelift-fleet-targetconfiguration-targetvalue"></a>
Desired value to use with a target-based scaling policy. The value must be relevant for whatever metric the scaling policy is using. For example, in a policy using the metric PercentAvailableGameSessions, the target value should be the preferred size of the fleet's buffer (the percent of capacity that should be idle and ready for new game sessions).  
*Required*: Yes  
*Type*: Number  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)