fleets
Creates, updates, deletes or gets a fleet
resource or lists fleets
in a region
Overview
Name | fleets |
Type | Resource |
Description | The AWS::GameLift::Fleet resource creates an Amazon GameLift (GameLift) fleet to host game servers. A fleet is a set of EC2 or Anywhere instances, each of which can host multiple game sessions. |
Id | aws.gamelift.fleets |
Fields
Name | Datatype | Description |
---|---|---|
scaling_policies | array | A list of rules that control how a fleet is scaled. |
anywhere_configuration | undefined | Configuration for Anywhere fleet. |
apply_capacity | string | Determines whether to apply fleet or location capacities on fleet creation. |
certificate_configuration | object | Indicates whether to generate a TLS/SSL certificate for the new fleet. TLS certificates are used for encrypting traffic between game clients and game servers running on GameLift. If this parameter is not set, certificate generation is disabled. This fleet setting cannot be changed once the fleet is created. |
compute_type | string | ComputeType to differentiate EC2 hardware managed by GameLift and Anywhere hardware managed by the customer. |
container_groups_configuration | object | Specifies container groups that this instance will hold. You must specify exactly one replica group. Optionally, you may specify exactly one daemon group. You can't change this property after you create the fleet. |
description | string | A human-readable description of a fleet. |
desired_ec2_instances | integer | [DEPRECATED] The number of EC2 instances that you want this fleet to host. When creating a new fleet, GameLift automatically sets this value to "1" and initiates a single instance. Once the fleet is active, update this value to trigger GameLift to add or remove instances from the fleet. |
e_c2_inbound_permissions | array | A range of IP addresses and port settings that allow inbound traffic to connect to server processes on an Amazon GameLift server. |
e_c2_instance_type | string | The name of an EC2 instance type that is supported in Amazon GameLift. A fleet instance type determines the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. Amazon GameLift supports the following EC2 instance types. See Amazon EC2 Instance Types for detailed descriptions. |
fleet_type | string | Indicates whether to use On-Demand instances or Spot instances for this fleet. If empty, the default is ON_DEMAND. Both categories of instances use identical hardware and configurations based on the instance type selected for this fleet. |
instance_role_arn | string | A unique identifier for an AWS 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 from the IAM dashboard in the AWS Management Console. |
instance_role_credentials_provider | string | Credentials provider implementation that loads credentials from the Amazon EC2 Instance Metadata Service. |
locations | array | |
log_paths | array | This parameter is no longer used. When hosting a custom game build, specify where Amazon GameLift should store log files using the Amazon GameLift server API call ProcessReady() |
max_size | integer | [DEPRECATED] The maximum value that is allowed for the fleet's instance count. When creating a new fleet, GameLift automatically sets this value to "1". Once the fleet is active, you can change this value. |
metric_groups | array | The name of an Amazon CloudWatch metric group. A metric group aggregates the metrics for all fleets in the group. Specify a string containing the metric group name. You can use an existing name or use a new name to create a new metric group. Currently, this parameter can have only one string. |
min_size | integer | [DEPRECATED] The minimum value allowed for the fleet's instance count. When creating a new fleet, GameLift automatically sets this value to "0". After the fleet is active, you can change this value. |
name | string | A descriptive label that is associated with a fleet. Fleet names do not need to be unique. |
new_game_session_protection_policy | string | A game session protection policy to apply to all game sessions hosted on instances in this fleet. When protected, active game sessions cannot be terminated during a scale-down event. If this parameter is not set, instances in this fleet default to no protection. You can change a fleet's protection policy to affect future game sessions on the fleet. You can also set protection for individual game sessions. |
peer_vpc_aws_account_id | string | A unique identifier for the AWS account with the VPC that you want to peer your Amazon GameLift fleet with. You can find your account ID in the AWS Management Console under account settings. |
peer_vpc_id | string | A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same Region as your fleet. To look up a VPC ID, use the VPC Dashboard in the AWS Management Console. |
resource_creation_limit_policy | object | A policy that limits the number of game sessions an individual player can create over a span of time for this fleet. |
fleet_id | string | Unique fleet ID |
build_id | string | 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. |
script_id | string | A unique identifier for a Realtime script to be deployed on a new Realtime Servers fleet. The script must have been successfully uploaded to Amazon GameLift. This fleet setting cannot be changed once the fleet is created. Note: It is not currently possible to 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. |
runtime_configuration | object | Instructions for launching server processes on each instance in the fleet. Server processes run either a custom game build executable or a Realtime script. The runtime configuration defines the server executables or launch script file, launch parameters, and the number of processes to run concurrently on each instance. When creating a fleet, the runtime configuration must have at least one server process configuration; otherwise the request fails with an invalid request exception. This parameter is required unless the parameters ServerLaunchPath and ServerLaunchParameters are defined. Runtime configuration has replaced these parameters, but fleets that use them will continue to work. |
server_launch_parameters | string | This parameter is no longer used but is retained for backward compatibility. Instead, specify server launch parameters in the RuntimeConfiguration parameter. A request must specify either a runtime configuration or values for both ServerLaunchParameters and ServerLaunchPath. |
server_launch_path | string | This parameter is no longer used. Instead, specify a server launch path using the RuntimeConfiguration parameter. Requests that specify a server launch path and launch parameters instead of a runtime configuration will continue to work. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all fleets
in a region.
SELECT
region,
scaling_policies,
anywhere_configuration,
apply_capacity,
certificate_configuration,
compute_type,
container_groups_configuration,
description,
desired_ec2_instances,
e_c2_inbound_permissions,
e_c2_instance_type,
fleet_type,
instance_role_arn,
instance_role_credentials_provider,
locations,
log_paths,
max_size,
metric_groups,
min_size,
name,
new_game_session_protection_policy,
peer_vpc_aws_account_id,
peer_vpc_id,
resource_creation_limit_policy,
fleet_id,
build_id,
script_id,
runtime_configuration,
server_launch_parameters,
server_launch_path
FROM aws.gamelift.fleets
WHERE region = 'us-east-1';
Gets all properties from an individual fleet
.
SELECT
region,
scaling_policies,
anywhere_configuration,
apply_capacity,
certificate_configuration,
compute_type,
container_groups_configuration,
description,
desired_ec2_instances,
e_c2_inbound_permissions,
e_c2_instance_type,
fleet_type,
instance_role_arn,
instance_role_credentials_provider,
locations,
log_paths,
max_size,
metric_groups,
min_size,
name,
new_game_session_protection_policy,
peer_vpc_aws_account_id,
peer_vpc_id,
resource_creation_limit_policy,
fleet_id,
build_id,
script_id,
runtime_configuration,
server_launch_parameters,
server_launch_path
FROM aws.gamelift.fleets
WHERE region = 'us-east-1' AND data__Identifier = '<FleetId>';
INSERT
example
Use the following StackQL query and manifest file to create a new fleet
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.gamelift.fleets (
Name,
region
)
SELECT
'{{ Name }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.gamelift.fleets (
ScalingPolicies,
AnywhereConfiguration,
ApplyCapacity,
CertificateConfiguration,
ComputeType,
ContainerGroupsConfiguration,
Description,
DesiredEC2Instances,
EC2InboundPermissions,
EC2InstanceType,
FleetType,
InstanceRoleARN,
InstanceRoleCredentialsProvider,
Locations,
LogPaths,
MaxSize,
MetricGroups,
MinSize,
Name,
NewGameSessionProtectionPolicy,
PeerVpcAwsAccountId,
PeerVpcId,
ResourceCreationLimitPolicy,
BuildId,
ScriptId,
RuntimeConfiguration,
ServerLaunchParameters,
ServerLaunchPath,
region
)
SELECT
'{{ ScalingPolicies }}',
'{{ AnywhereConfiguration }}',
'{{ ApplyCapacity }}',
'{{ CertificateConfiguration }}',
'{{ ComputeType }}',
'{{ ContainerGroupsConfiguration }}',
'{{ Description }}',
'{{ DesiredEC2Instances }}',
'{{ EC2InboundPermissions }}',
'{{ EC2InstanceType }}',
'{{ FleetType }}',
'{{ InstanceRoleARN }}',
'{{ InstanceRoleCredentialsProvider }}',
'{{ Locations }}',
'{{ LogPaths }}',
'{{ MaxSize }}',
'{{ MetricGroups }}',
'{{ MinSize }}',
'{{ Name }}',
'{{ NewGameSessionProtectionPolicy }}',
'{{ PeerVpcAwsAccountId }}',
'{{ PeerVpcId }}',
'{{ ResourceCreationLimitPolicy }}',
'{{ BuildId }}',
'{{ ScriptId }}',
'{{ RuntimeConfiguration }}',
'{{ ServerLaunchParameters }}',
'{{ ServerLaunchPath }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: fleet
props:
- name: ScalingPolicies
value:
- ComparisonOperator: '{{ ComparisonOperator }}'
EvaluationPeriods: '{{ EvaluationPeriods }}'
Location:
LocationName: '{{ LocationName }}'
Tags:
- Key: '{{ Key }}'
Value: '{{ Value }}'
MetricName: '{{ MetricName }}'
Name: '{{ Name }}'
PolicyType: '{{ PolicyType }}'
ScalingAdjustment: '{{ ScalingAdjustment }}'
ScalingAdjustmentType: '{{ ScalingAdjustmentType }}'
Status: '{{ Status }}'
TargetConfiguration:
TargetValue: null
Threshold: null
UpdateStatus: '{{ UpdateStatus }}'
- name: AnywhereConfiguration
value: null
- name: ApplyCapacity
value: '{{ ApplyCapacity }}'
- name: CertificateConfiguration
value:
CertificateType: '{{ CertificateType }}'
- name: ComputeType
value: '{{ ComputeType }}'
- name: ContainerGroupsConfiguration
value:
ContainerGroupDefinitionNames:
- '{{ ContainerGroupDefinitionNames[0] }}'
ConnectionPortRange:
FromPort: '{{ FromPort }}'
ToPort: '{{ ToPort }}'
ContainerGroupsPerInstance:
DesiredReplicaContainerGroupsPerInstance: '{{ DesiredReplicaContainerGroupsPerInstance }}'
MaxReplicaContainerGroupsPerInstance: '{{ MaxReplicaContainerGroupsPerInstance }}'
- name: Description
value: '{{ Description }}'
- name: DesiredEC2Instances
value: '{{ DesiredEC2Instances }}'
- name: EC2InboundPermissions
value:
- FromPort: '{{ FromPort }}'
IpRange: '{{ IpRange }}'
Protocol: '{{ Protocol }}'
ToPort: '{{ ToPort }}'
- name: EC2InstanceType
value: '{{ EC2InstanceType }}'
- name: FleetType
value: '{{ FleetType }}'
- name: InstanceRoleARN
value: '{{ InstanceRoleARN }}'
- name: InstanceRoleCredentialsProvider
value: '{{ InstanceRoleCredentialsProvider }}'
- name: Locations
value:
- Location: null
LocationCapacity:
DesiredEC2Instances: '{{ DesiredEC2Instances }}'
MinSize: '{{ MinSize }}'
MaxSize: '{{ MaxSize }}'
- name: LogPaths
value:
- '{{ LogPaths[0] }}'
- name: MaxSize
value: '{{ MaxSize }}'
- name: MetricGroups
value:
- '{{ MetricGroups[0] }}'
- name: MinSize
value: '{{ MinSize }}'
- name: Name
value: '{{ Name }}'
- name: NewGameSessionProtectionPolicy
value: '{{ NewGameSessionProtectionPolicy }}'
- name: PeerVpcAwsAccountId
value: '{{ PeerVpcAwsAccountId }}'
- name: PeerVpcId
value: '{{ PeerVpcId }}'
- name: ResourceCreationLimitPolicy
value:
NewGameSessionsPerCreator: '{{ NewGameSessionsPerCreator }}'
PolicyPeriodInMinutes: '{{ PolicyPeriodInMinutes }}'
- name: BuildId
value: '{{ BuildId }}'
- name: ScriptId
value: '{{ ScriptId }}'
- name: RuntimeConfiguration
value:
GameSessionActivationTimeoutSeconds: '{{ GameSessionActivationTimeoutSeconds }}'
MaxConcurrentGameSessionActivations: '{{ MaxConcurrentGameSessionActivations }}'
ServerProcesses:
- ConcurrentExecutions: '{{ ConcurrentExecutions }}'
LaunchPath: '{{ LaunchPath }}'
Parameters: '{{ Parameters }}'
- name: ServerLaunchParameters
value: '{{ ServerLaunchParameters }}'
- name: ServerLaunchPath
value: '{{ ServerLaunchPath }}'
DELETE
example
/*+ delete */
DELETE FROM aws.gamelift.fleets
WHERE data__Identifier = '<FleetId>'
AND region = 'us-east-1';
Permissions
To operate on the fleets
resource, the following permissions are required:
Create
gamelift:CreateFleet,
gamelift:DescribeFleetAttributes,
gamelift:DescribeFleetLocationAttributes,
gamelift:UpdateFleetCapacity,
gamelift:DescribeFleetLocationCapacity,
gamelift:PutScalingPolicy,
gamelift:DescribeScalingPolicies
Read
gamelift:DescribeFleetAttributes,
gamelift:DescribeFleetLocationAttributes,
gamelift:DescribeFleetCapacity,
gamelift:DescribeFleetPortSettings,
gamelift:DescribeFleetUtilization,
gamelift:DescribeRuntimeConfiguration,
gamelift:DescribeEC2InstanceLimits,
gamelift:DescribeFleetEvents,
gamelift:DescribeScalingPolicies
Update
gamelift:UpdateFleetAttributes,
gamelift:CreateFleetLocations,
gamelift:DeleteFleetLocations,
gamelift:UpdateFleetCapacity,
gamelift:UpdateFleetPortSettings,
gamelift:UpdateRuntimeConfiguration,
gamelift:DescribeFleetLocationCapacity,
gamelift:DescribeFleetPortSettings,
gamelift:DescribeFleetLocationAttributes,
gamelift:PutScalingPolicy,
gamelift:DescribeScalingPolicies,
gamelift:DeleteScalingPolicy
Delete
gamelift:DeleteFleet,
gamelift:DescribeFleetLocationCapacity,
gamelift:DescribeScalingPolicies,
gamelift:DeleteScalingPolicy
List
gamelift:ListFleets