Skip to main content

fleets

Creates, updates, deletes or gets a fleet resource or lists fleets in a region

Overview

Namefleets
TypeResource
DescriptionThe 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.
Idaws.gamelift.fleets

Fields

NameDatatypeDescription
scaling_policiesarrayA list of rules that control how a fleet is scaled.
anywhere_configurationundefinedConfiguration for Anywhere fleet.
apply_capacitystringDetermines whether to apply fleet or location capacities on fleet creation.
certificate_configurationobjectIndicates 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_typestringComputeType to differentiate EC2 hardware managed by GameLift and Anywhere hardware managed by the customer.
container_groups_configurationobjectSpecifies 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.
descriptionstringA human-readable description of a fleet.
desired_ec2_instancesinteger[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_permissionsarrayA range of IP addresses and port settings that allow inbound traffic to connect to server processes on an Amazon GameLift server.
e_c2_instance_typestringThe 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_typestringIndicates 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_arnstringA 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_providerstringCredentials provider implementation that loads credentials from the Amazon EC2 Instance Metadata Service.
locationsarray
log_pathsarrayThis 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_sizeinteger[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_groupsarrayThe 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_sizeinteger[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.
namestringA descriptive label that is associated with a fleet. Fleet names do not need to be unique.
new_game_session_protection_policystringA 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_idstringA 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_idstringA 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_policyobjectA policy that limits the number of game sessions an individual player can create over a span of time for this fleet.
fleet_idstringUnique fleet ID
build_idstringA 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_idstringA 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_configurationobjectInstructions 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_parametersstringThis 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_pathstringThis 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.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.gamelift.fleets (
Name,
region
)
SELECT
'{{ Name }}',
'{{ region }}';

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