GameLift / Client / create_fleet
create_fleet#
- GameLift.Client.create_fleet(**kwargs)#
This operation has been expanded to use with the Amazon GameLift containers feature, which is currently in public preview.
Creates a fleet of compute resources to host your game servers. Use this operation to set up the following types of fleets based on compute type:
Managed EC2 fleet
An EC2 fleet is a set of Amazon Elastic Compute Cloud (Amazon EC2) instances. Your game server build is deployed to each fleet instance. Amazon GameLift manages the fleet’s instances and controls the lifecycle of game server processes, which host game sessions for players. EC2 fleets can have instances in multiple locations. Each instance in the fleet is designated a
Compute
.To create an EC2 fleet, provide these required parameters:
Either
BuildId
orScriptId
ComputeType
set toEC2
(the default value)EC2InboundPermissions
EC2InstanceType
FleetType
Name
RuntimeConfiguration
with at least oneServerProcesses
configuration
If successful, this operation creates a new fleet resource and places it in
NEW
status while Amazon GameLift initiates the fleet creation workflow. To debug your fleet, fetch logs, view performance metrics or other actions on the fleet, create a development fleet with port 22/3389 open. As a best practice, we recommend opening ports for remote access only when you need them and closing them when you’re finished.When the fleet status is ACTIVE, you can adjust capacity settings and turn autoscaling on/off for each location.
Managed container fleet
A container fleet is a set of Amazon Elastic Compute Cloud (Amazon EC2) instances. Your container architecture is deployed to each fleet instance based on the fleet configuration. Amazon GameLift manages the containers on each fleet instance and controls the lifecycle of game server processes, which host game sessions for players. Container fleets can have instances in multiple locations. Each container on an instance that runs game server processes is registered as a
Compute
.To create a container fleet, provide these required parameters:
ComputeType
set toCONTAINER
ContainerGroupsConfiguration
EC2InboundPermissions
EC2InstanceType
FleetType
set toON_DEMAND
Name
RuntimeConfiguration
with at least oneServerProcesses
configuration
If successful, this operation creates a new fleet resource and places it in
NEW
status while Amazon GameLift initiates the fleet creation workflow.When the fleet status is ACTIVE, you can adjust capacity settings and turn autoscaling on/off for each location.
Anywhere fleet
An Anywhere fleet represents compute resources that are not owned or managed by Amazon GameLift. You might create an Anywhere fleet with your local machine for testing, or use one to host game servers with on-premises hardware or other game hosting solutions.
To create an Anywhere fleet, provide these required parameters:
ComputeType
set toANYWHERE
Locations
specifying a custom locationName
If successful, this operation creates a new fleet resource and places it in
ACTIVE
status. You can register computes with a fleet inACTIVE
status.Learn more
See also: AWS API Documentation
Request Syntax
response = client.create_fleet( Name='string', Description='string', BuildId='string', ScriptId='string', ServerLaunchPath='string', ServerLaunchParameters='string', LogPaths=[ 'string', ], EC2InstanceType='t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'r7g.medium'|'r7g.large'|'r7g.xlarge'|'r7g.2xlarge'|'r7g.4xlarge'|'r7g.8xlarge'|'r7g.12xlarge'|'r7g.16xlarge'|'m7g.medium'|'m7g.large'|'m7g.xlarge'|'m7g.2xlarge'|'m7g.4xlarge'|'m7g.8xlarge'|'m7g.12xlarge'|'m7g.16xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge', EC2InboundPermissions=[ { 'FromPort': 123, 'ToPort': 123, 'IpRange': 'string', 'Protocol': 'TCP'|'UDP' }, ], NewGameSessionProtectionPolicy='NoProtection'|'FullProtection', RuntimeConfiguration={ 'ServerProcesses': [ { 'LaunchPath': 'string', 'Parameters': 'string', 'ConcurrentExecutions': 123 }, ], 'MaxConcurrentGameSessionActivations': 123, 'GameSessionActivationTimeoutSeconds': 123 }, ResourceCreationLimitPolicy={ 'NewGameSessionsPerCreator': 123, 'PolicyPeriodInMinutes': 123 }, MetricGroups=[ 'string', ], PeerVpcAwsAccountId='string', PeerVpcId='string', FleetType='ON_DEMAND'|'SPOT', InstanceRoleArn='string', CertificateConfiguration={ 'CertificateType': 'DISABLED'|'GENERATED' }, Locations=[ { 'Location': 'string' }, ], Tags=[ { 'Key': 'string', 'Value': 'string' }, ], ComputeType='EC2'|'ANYWHERE'|'CONTAINER', AnywhereConfiguration={ 'Cost': 'string' }, InstanceRoleCredentialsProvider='SHARED_CREDENTIAL_FILE', ContainerGroupsConfiguration={ 'ContainerGroupDefinitionNames': [ 'string', ], 'ConnectionPortRange': { 'FromPort': 123, 'ToPort': 123 }, 'DesiredReplicaContainerGroupsPerInstance': 123 } )
- Parameters:
Name (string) –
[REQUIRED]
A descriptive label that is associated with a fleet. Fleet names do not need to be unique.
Description (string) – A description for the fleet.
BuildId (string) – The unique identifier for a custom game server build to be deployed to a fleet with compute type
EC2
. You can use either the build ID or ARN. The build must be uploaded to Amazon GameLift and inREADY
status. This fleet property can’t be changed after the fleet is created.ScriptId (string) – The unique identifier for a Realtime configuration script to be deployed to a fleet with compute type
EC2
. You can use either the script ID or ARN. Scripts must be uploaded to Amazon GameLift prior to creating the fleet. This fleet property can’t be changed after the fleet is created.ServerLaunchPath (string) – This parameter is no longer used. Specify a server launch path using the
RuntimeConfiguration
parameter. Requests that use this parameter instead continue to be valid.ServerLaunchParameters (string) – This parameter is no longer used. Specify server launch parameters using the
RuntimeConfiguration
parameter. Requests that use this parameter instead continue to be valid.LogPaths (list) –
This parameter is no longer used. To specify where Amazon GameLift should store log files once a server process shuts down, use the Amazon GameLift server API
ProcessReady()
and specify one or more directory paths inlogParameters
. For more information, see Initialize the server process in the Amazon GameLift Developer Guide.(string) –
EC2InstanceType (string) – The Amazon GameLift-supported Amazon EC2 instance type to use with EC2 and container 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 for detailed descriptions of Amazon EC2 instance types.
EC2InboundPermissions (list) –
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 EC2 and container fleets. You can leave this parameter empty when creating the fleet, but you must call 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 Realtime Servers fleets, Amazon GameLift automatically sets TCP and UDP ranges.
To manage inbound access for a container fleet, set this parameter to the same port numbers that you set for the fleet’s connection port range. During the life of the fleet, update this parameter to control which connection ports are open to inbound traffic.
(dict) –
A range of IP addresses and port settings that allow inbound traffic to connect to processes on an instance in a fleet. Processes are assigned an IP address/port number combination, which must fall into the fleet’s allowed ranges. For container fleets, the port settings must use the same port numbers as the fleet’s connection ports.
For Realtime Servers fleets, Amazon GameLift automatically opens two port ranges, one for TCP messaging and one for UDP.
FromPort (integer) – [REQUIRED]
A starting value for a range of allowed port numbers.
For fleets using Linux builds, only ports
22
and1026-60000
are valid.For fleets using Windows builds, only ports
1026-60000
are valid.ToPort (integer) – [REQUIRED]
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
and1026-60000
are valid.For fleets using Windows builds, only ports
1026-60000
are valid.IpRange (string) – [REQUIRED]
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]
”.Protocol (string) – [REQUIRED]
The network communication protocol used by the fleet.
NewGameSessionProtectionPolicy (string) –
The status of termination protection for active game sessions on the fleet. By default, this property is set to
NoProtection
. You can also set game session protection for an individual game session by calling UpdateGameSession.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.
RuntimeConfiguration (dict) –
Instructions for how to launch and run server processes on the fleet. Set runtime configuration for EC2 fleets and container fleets. For an Anywhere fleets, set this parameter only if the fleet is running the Amazon GameLift Agent. The runtime configuration defines one or more server process configurations. Each server process identifies a game executable or Realtime script file and the number of processes to run concurrently.
Note
This parameter replaces the parameters
ServerLaunchPath
andServerLaunchParameters
, which are still supported for backward compatibility.ServerProcesses (list) –
A collection of server process configurations that identify what server processes to run on fleet computes.
(dict) –
A set of instructions for launching server processes on fleet computes. Server processes run either an executable in a custom game build or a Realtime Servers script. Server process configurations are part of a fleet’s runtime configuration.
LaunchPath (string) – [REQUIRED]
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
”
Note
Amazon GameLift 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()
andProcessReady()
.Parameters (string) –
An optional list of parameters to pass to the server executable or Realtime script on launch.
ConcurrentExecutions (integer) – [REQUIRED]
The number of server processes using this configuration that run concurrently on each instance or container..
MaxConcurrentGameSessionActivations (integer) –
The number of game sessions in status
ACTIVATING
to allow on an instance or container. This setting limits the instance resources that can be used for new game activations at any one time.GameSessionActivationTimeoutSeconds (integer) –
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 toTERMINATED
.
ResourceCreationLimitPolicy (dict) –
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.
NewGameSessionsPerCreator (integer) –
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 checks that the player (identified byCreatorId
) has created fewer than game session limit in the specified time period.PolicyPeriodInMinutes (integer) –
The time span used in evaluating the resource creation limit policy.
MetricGroups (list) –
The name of an Amazon Web Services 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.
(string) –
PeerVpcAwsAccountId (string) – Used when peering your Amazon GameLift fleet with a VPC, the unique identifier for the Amazon Web Services account that owns the VPC. You can find your account ID in the Amazon Web Services Management Console under account settings.
PeerVpcId (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 Amazon Web Services Management Console. Learn more about VPC peering in VPC Peering with Amazon GameLift Fleets.
FleetType (string) – 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. This fleet property can’t be changed after the fleet is created.InstanceRoleArn (string) – A unique identifier for an IAM role with access permissions to other Amazon Web Services services. Any application that runs on an instance in the fleet–including install scripts, server processes, and other processes–can use these permissions to interact with Amazon Web Services resources that you own or have access to. For more information about using the role with your game server builds, see Communicate with other Amazon Web Services resources from your fleets. This fleet property can’t be changed after the fleet is created.
CertificateConfiguration (dict) –
Prompts Amazon GameLift to generate a TLS/SSL certificate for the fleet. Amazon GameLift uses the certificates to encrypt traffic between game clients and the game servers running on Amazon GameLift. By default, the
CertificateConfiguration
isDISABLED
. You can’t change this property after you create the fleet.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.
Note
ACM isn’t available in all Amazon Web Services 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 in the Certificate Manager User Guide.
CertificateType (string) – [REQUIRED]
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.
Locations (list) –
A set of remote locations to deploy additional instances to and manage as part of the fleet. This parameter can only be used when creating fleets in Amazon Web Services Regions that support multiple locations. You can add any Amazon GameLift-supported Amazon Web Services Region as a remote location, in the form of an Amazon Web Services Region code, such as
us-west-2
or Local Zone code. To create a fleet with instances in the home Region only, don’t set this parameter.When using this parameter, Amazon GameLift requires you to include your home location in the request.
(dict) –
This data type has been expanded to use with the Amazon GameLift containers feature, which is currently in public preview.
A remote location where a multi-location fleet can deploy game servers for game hosting.
Location (string) – [REQUIRED]
An Amazon Web Services Region code, such as
us-west-2
.
Tags (list) –
A list of labels to assign to the new fleet resource. Tags are developer-defined key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost allocation. For more information, see Tagging Amazon Web Services Resources in the Amazon Web Services General Reference.
(dict) –
A label that you can assign to a Amazon GameLift resource.
Learn more
Tagging Amazon Web Services Resources in the Amazon Web Services General Reference
Amazon Web Services Tagging Strategies
Related actions
Key (string) – [REQUIRED]
The key for a developer-defined key value pair for tagging an Amazon Web Services resource.
Value (string) – [REQUIRED]
The value for a developer-defined key value pair for tagging an Amazon Web Services resource.
ComputeType (string) –
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.CONTAINER
– Container images with your game server build and supporting software are deployed to Amazon EC2 instances for cloud hosting. With this compute type, you must specify theContainerGroupsConfiguration
parameter.ANYWHERE
– Game servers or container images with your game server and supporting software are deployed to compute resources that are provided and managed by you. With this compute type, you can also set theAnywhereConfiguration
parameter.
AnywhereConfiguration (dict) –
Amazon GameLift Anywhere configuration options.
Cost (string) – [REQUIRED]
The cost to run your fleet per hour. Amazon GameLift uses the provided cost of your fleet to balance usage in queues. For more information about queues, see Setting up queues in the Amazon GameLift Developer Guide.
InstanceRoleCredentialsProvider (string) – Prompts Amazon GameLift to generate a shared credentials file for the IAM role that’s defined in
InstanceRoleArn
. The shared credentials file is stored on each fleet instance and refreshed as needed. Use shared credentials for applications that are deployed along with the game server executable, if the game server is integrated with server SDK version 5.x. For more information about using shared credentials, see Communicate with other Amazon Web Services resources from your fleets.ContainerGroupsConfiguration (dict) –
The container groups to deploy to instances in the container fleet and other fleet-level configuration settings. Use the CreateContainerGroupDefinition action to create container groups. A container fleet must have exactly one replica container group, and can optionally have one daemon container group. You can’t change this property after you create the fleet.
ContainerGroupDefinitionNames (list) – [REQUIRED]
The list of container group definition names to deploy to a new container fleet.
(string) –
ConnectionPortRange (dict) – [REQUIRED]
A set of ports to allow inbound traffic, including game clients, to connect to processes running in the container fleet.
Connection ports are dynamically mapped to container ports, which are assigned to individual processes running in a container. The connection port range must have enough ports to map to all container ports across a fleet instance. To calculate the minimum connection ports needed, use the following formula:
[Total number of container ports as defined for containers in the replica container group] * [Desired or calculated number of replica container groups per instance] + [Total number of container ports as defined for containers in the daemon container group]
As a best practice, double the minimum number of connection ports.
Note
Use the fleet’s
EC2InboundPermissions
property to control external access to connection ports. Set this property to the connection port numbers that you want to open access to. See IpPermission for more details.FromPort (integer) – [REQUIRED]
Starting value for the port range.
ToPort (integer) – [REQUIRED]
Ending value for the port. Port numbers are end-inclusive. This value must be equal to or greater than
FromPort
.
DesiredReplicaContainerGroupsPerInstance (integer) –
The number of times to replicate the replica container group on each instance in a container fleet. By default, Amazon GameLift calculates the maximum number of replica container groups that can fit on a fleet instance (based on CPU and memory resources). Leave this parameter empty if you want to use the maximum number, or specify a desired number to override the maximum. The desired number is used if it’s less than the maximum number.
- Return type:
dict
- Returns:
Response Syntax
{ 'FleetAttributes': { 'FleetId': 'string', 'FleetArn': 'string', 'FleetType': 'ON_DEMAND'|'SPOT', 'InstanceType': 't2.micro'|'t2.small'|'t2.medium'|'t2.large'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'r7g.medium'|'r7g.large'|'r7g.xlarge'|'r7g.2xlarge'|'r7g.4xlarge'|'r7g.8xlarge'|'r7g.12xlarge'|'r7g.16xlarge'|'m7g.medium'|'m7g.large'|'m7g.xlarge'|'m7g.2xlarge'|'m7g.4xlarge'|'m7g.8xlarge'|'m7g.12xlarge'|'m7g.16xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge', 'Description': 'string', 'Name': 'string', 'CreationTime': datetime(2015, 1, 1), 'TerminationTime': datetime(2015, 1, 1), 'Status': 'NEW'|'DOWNLOADING'|'VALIDATING'|'BUILDING'|'ACTIVATING'|'ACTIVE'|'DELETING'|'ERROR'|'TERMINATED'|'NOT_FOUND', 'BuildId': 'string', 'BuildArn': 'string', 'ScriptId': 'string', 'ScriptArn': 'string', 'ServerLaunchPath': 'string', 'ServerLaunchParameters': 'string', 'LogPaths': [ 'string', ], 'NewGameSessionProtectionPolicy': 'NoProtection'|'FullProtection', 'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX'|'AMAZON_LINUX_2'|'WINDOWS_2016'|'AMAZON_LINUX_2023', 'ResourceCreationLimitPolicy': { 'NewGameSessionsPerCreator': 123, 'PolicyPeriodInMinutes': 123 }, 'MetricGroups': [ 'string', ], 'StoppedActions': [ 'AUTO_SCALING', ], 'InstanceRoleArn': 'string', 'CertificateConfiguration': { 'CertificateType': 'DISABLED'|'GENERATED' }, 'ComputeType': 'EC2'|'ANYWHERE'|'CONTAINER', 'AnywhereConfiguration': { 'Cost': 'string' }, 'InstanceRoleCredentialsProvider': 'SHARED_CREDENTIAL_FILE', 'ContainerGroupsAttributes': { 'ContainerGroupDefinitionProperties': [ { 'SchedulingStrategy': 'REPLICA'|'DAEMON', 'ContainerGroupDefinitionName': 'string' }, ], 'ConnectionPortRange': { 'FromPort': 123, 'ToPort': 123 }, 'ContainerGroupsPerInstance': { 'DesiredReplicaContainerGroupsPerInstance': 123, 'MaxReplicaContainerGroupsPerInstance': 123 } } }, 'LocationStates': [ { 'Location': 'string', 'Status': 'NEW'|'DOWNLOADING'|'VALIDATING'|'BUILDING'|'ACTIVATING'|'ACTIVE'|'DELETING'|'ERROR'|'TERMINATED'|'NOT_FOUND' }, ] }
Response Structure
(dict) –
FleetAttributes (dict) –
The properties for the new fleet, including the current status. All fleets are placed in
NEW
status on creation.FleetId (string) –
A unique identifier for the fleet.
FleetArn (string) –
The Amazon Resource Name ( ARN) that is assigned to a Amazon GameLift 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 theFleetId
value.FleetType (string) –
Indicates whether the fleet uses On-Demand or Spot instances. For more information, see On-Demand versus Spot Instances. This fleet property can’t be changed after the fleet is created.
InstanceType (string) –
The Amazon EC2 instance type that the fleet uses. Instance type determines the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. See Amazon Elastic Compute Cloud Instance Types for detailed descriptions. This attribute is used with fleets where
ComputeType
is “EC2” or “Container”.Description (string) –
A human-readable description of the fleet.
Name (string) –
A descriptive label that is associated with a fleet. Fleet names do not need to be unique.
CreationTime (datetime) –
A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example
"1469498468.057"
).TerminationTime (datetime) –
A time stamp indicating when this data object was terminated. Format is a number expressed in Unix time as milliseconds (for example
"1469498468.057"
).Status (string) –
Current status of the fleet. Possible fleet statuses include the following:
NEW – A new fleet has been defined and desired instances is set to 1.
DOWNLOADING/VALIDATING/BUILDING/ACTIVATING – Amazon GameLift is setting up the new fleet, creating new instances with the game build or Realtime script and starting server processes.
ACTIVE – Hosts can now accept game sessions.
ERROR – An error occurred when downloading, validating, building, or activating the fleet.
DELETING – Hosts are responding to a delete fleet request.
TERMINATED – The fleet no longer exists.
BuildId (string) –
A unique identifier for the build resource that is deployed on instances in this fleet. This attribute is used with fleets where
ComputeType
is “EC2”.BuildArn (string) –
The Amazon Resource Name ( ARN) associated with the Amazon GameLift build resource that is deployed on instances in this fleet. In a GameLift build ARN, the resource ID matches the
BuildId
value. This attribute is used with fleets whereComputeType
is “EC2”.ScriptId (string) –
A unique identifier for the Realtime script resource that is deployed on instances in this fleet. This attribute is used with fleets where
ComputeType
is “EC2”.ScriptArn (string) –
The Amazon Resource Name ( ARN) associated with the GameLift script resource that is deployed on instances in this fleet. In a GameLift script ARN, the resource ID matches the
ScriptId
value.ServerLaunchPath (string) –
This parameter is no longer used. Server launch paths are now defined using the fleet’s RuntimeConfiguration . Requests that use this parameter continue to be valid.
ServerLaunchParameters (string) –
This parameter is no longer used. Server launch parameters are now defined using the fleet’s runtime configuration . Requests that use this parameter continue to be valid.
LogPaths (list) –
This parameter is no longer used. Game session log paths are now defined using the Amazon GameLift server API
ProcessReady()
logParameters
. See more information in the Server API Reference.(string) –
NewGameSessionProtectionPolicy (string) –
The type of game session protection to set on all new instances that are started in the fleet. This attribute is used with fleets where
ComputeType
is “EC2” or “Container”.NoProtection – The game session can be terminated during a scale-down event.
FullProtection – If the game session is in an
ACTIVE
status, it cannot be terminated during a scale-down event.
OperatingSystem (string) –
The operating system of the fleet’s computing resources. A fleet’s operating system is determined by the OS of the build or script that is deployed on this fleet. This attribute is used with fleets where
ComputeType
is “EC2” or “Container”.ResourceCreationLimitPolicy (dict) –
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 checks that the player (identified byCreatorId
) has created fewer than game session limit in the specified time period.NewGameSessionsPerCreator (integer) –
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 checks that the player (identified byCreatorId
) has created fewer than game session limit in the specified time period.PolicyPeriodInMinutes (integer) –
The time span used in evaluating the resource creation limit policy.
MetricGroups (list) –
Name of a metric group that metrics for this fleet are added to. In Amazon CloudWatch, you can view aggregated metrics for fleets that are in a metric group. A fleet can be included in only one metric group at a time. This attribute is used with fleets where
ComputeType
is “EC2” or “Container”.(string) –
StoppedActions (list) –
A list of fleet activity that has been suspended using StopFleetActions. This includes fleet auto-scaling. This attribute is used with fleets where
ComputeType
is “EC2” or “Container”.(string) –
InstanceRoleArn (string) –
A unique identifier for an IAM role with access permissions to other Amazon Web Services services. Any application that runs on an instance in the fleet–including install scripts, server processes, and other processes–can use these permissions to interact with Amazon Web Services resources that you own or have access to. For more information about using the role with your game server builds, see Communicate with other Amazon Web Services resources from your fleets. This attribute is used with fleets where
ComputeType
is “EC2” or “Container”.CertificateConfiguration (dict) –
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.
CertificateType (string) –
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.
ComputeType (string) –
The type of compute resource used to host your game servers. You can use your own compute resources with Amazon GameLift Anywhere or use Amazon EC2 instances with managed Amazon GameLift.
AnywhereConfiguration (dict) –
This property is used with the Amazon GameLift containers feature, which is currently in public preview. A set of attributes that describe the container groups that are deployed on the fleet. These attributes are included for fleets with compute type
CONTAINER
only. This attribute is used with fleets whereComputeType
is “Container”.Cost (string) –
The cost to run your fleet per hour. Amazon GameLift uses the provided cost of your fleet to balance usage in queues. For more information about queues, see Setting up queues in the Amazon GameLift Developer Guide.
InstanceRoleCredentialsProvider (string) –
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 Amazon Web Services 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 Amazon Web Services resources from your fleets. This attribute is used with fleets whereComputeType
is “EC2” or “Container”.ContainerGroupsAttributes (dict) –
A set of properties that describe the container groups that are deployed to the fleet. These attributes are included for fleets with compute type
CONTAINER
.ContainerGroupDefinitionProperties (list) –
A collection of properties that describe each container group in the fleet. A container fleet is deployed with one or more ContainerGroupDefinition resources, which is where these properties are set.
(dict) –
This data type is used with the Amazon GameLift containers feature, which is currently in public preview.
The properties of a container group that is deployed to a container fleet.
Part of: ContainerGroupsAttributes
Returned by: DescribeFleetAttributes
SchedulingStrategy (string) –
The method for scheduling and maintaining copies of the container group across a container fleet.
ContainerGroupDefinitionName (string) –
The unique identifier for the container group definition.
ConnectionPortRange (dict) –
A set of ports that allow inbound traffic to connect to processes running in the fleet’s container groups. Amazon GameLift maps each connection port to a container port, which is assigned to a specific container process. A fleet’s connection port range can’t be changed, but you can control access to connection ports by updating a fleet’s
EC2InboundPermissions
with UpdateFleetPortSettings.FromPort (integer) –
Starting value for the port range.
ToPort (integer) –
Ending value for the port. Port numbers are end-inclusive. This value must be equal to or greater than
FromPort
.
ContainerGroupsPerInstance (dict) –
Details about the number of replica container groups that Amazon GameLift deploys to each instance in the container fleet.
DesiredReplicaContainerGroupsPerInstance (integer) –
The desired number of replica container groups to place on each fleet instance.
MaxReplicaContainerGroupsPerInstance (integer) –
The maximum possible number of replica container groups that each fleet instance can have.
LocationStates (list) –
The fleet’s locations and life-cycle status of each location. For new fleets, the status of all locations is set to
NEW
. During fleet creation, Amazon GameLift updates each location status as instances are deployed there and prepared for game hosting. This list includes an entry for the fleet’s home Region. For fleets with no remote locations, only one entry, representing the home Region, is returned.(dict) –
A fleet location and its life-cycle state. A location state object might be used to describe a fleet’s remote location or home Region. Life-cycle state tracks the progress of launching the first instance in a new location and preparing it for game hosting, and then removing all instances and deleting the location from the fleet.
NEW – A new fleet location has been defined and desired instances is set to 1.
DOWNLOADING/VALIDATING/BUILDING/ACTIVATING – Amazon GameLift is setting up the new fleet location, creating new instances with the game build or Realtime script and starting server processes.
ACTIVE – Hosts can now accept game sessions.
ERROR – An error occurred when downloading, validating, building, or activating the fleet location.
DELETING – Hosts are responding to a delete fleet location request.
TERMINATED – The fleet location no longer exists.
NOT_FOUND – The fleet location was not found. This could be because the custom location was removed or not created.
Location (string) –
The fleet location, expressed as an Amazon Web Services Region code such as
us-west-2
.Status (string) –
The life-cycle status of a fleet location.
Exceptions
GameLift.Client.exceptions.InternalServiceException
GameLift.Client.exceptions.NotFoundException
GameLift.Client.exceptions.NotReadyException
GameLift.Client.exceptions.ConflictException
GameLift.Client.exceptions.LimitExceededException
GameLift.Client.exceptions.InvalidRequestException
GameLift.Client.exceptions.UnauthorizedException
GameLift.Client.exceptions.TaggingFailedException
GameLift.Client.exceptions.UnsupportedRegionException