[ aws . gamelift ]

create-fleet

Description

Creates a fleet of Amazon Elastic Compute Cloud (Amazon Elastic Compute Cloud) instances to host your custom game server or Realtime Servers. Use this operation to configure the computing resources for your fleet and provide instructions for running game servers on each instance.

Most GameLift fleets can deploy instances to multiple locations, including the home Region (where the fleet is created) and an optional set of remote locations. Fleets that are created in the following Amazon Web Services Regions support multiple locations: us-east-1 (N. Virginia), us-west-2 (Oregon), eu-central-1 (Frankfurt), eu-west-1 (Ireland), ap-southeast-2 (Sydney), ap-northeast-1 (Tokyo), and ap-northeast-2 (Seoul). Fleets that are created in other GameLift Regions can deploy instances in the fleet’s home Region only. All fleet instances use the same configuration regardless of location; however, you can adjust capacity settings and turn auto-scaling on/off for each location.

To create a fleet, choose the hardware for your instances, specify a game server build or Realtime script to deploy, and provide a runtime configuration to direct GameLift how to start and run game servers on each instance in the fleet. Set permissions for inbound traffic to your game servers, and enable optional features as needed. When creating a multi-location fleet, provide a list of additional remote locations.

If you need to debug your fleet, fetch logs, view performance metrics or other actions on the fleet, create the 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.

If successful, this operation creates a new Fleet resource and places it in NEW status, which prompts GameLift to initiate the fleet creation workflow . You can track fleet creation by checking fleet status using DescribeFleetAttributes and DescribeFleetLocationAttributes /, or by monitoring fleet creation events using DescribeFleetEvents . As soon as the fleet status changes to ACTIVE , you can enable automatic scaling for the fleet with PutScalingPolicy and set capacity for the home Region with UpdateFleetCapacity . When the status of each remote location reaches ACTIVE , you can set capacity by location using UpdateFleetCapacity .

Learn more

Setting up fleets

Debug fleet creation issues

Multi-location fleets

Related actions

CreateFleet | UpdateFleetCapacity | PutScalingPolicy | DescribeEC2InstanceLimits | DescribeFleetAttributes | DescribeFleetLocationAttributes | UpdateFleetAttributes | StopFleetActions | DeleteFleet | All APIs by task

See also: AWS API Documentation

Synopsis

  create-fleet
--name <value>
[--description <value>]
[--build-id <value>]
[--script-id <value>]
[--server-launch-path <value>]
[--server-launch-parameters <value>]
[--log-paths <value>]
--ec2-instance-type <value>
[--ec2-inbound-permissions <value>]
[--new-game-session-protection-policy <value>]
[--runtime-configuration <value>]
[--resource-creation-limit-policy <value>]
[--metric-groups <value>]
[--peer-vpc-aws-account-id <value>]
[--peer-vpc-id <value>]
[--fleet-type <value>]
[--instance-role-arn <value>]
[--certificate-configuration <value>]
[--locations <value>]
[--tags <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]

Options

--name (string)

A descriptive label that is associated with a fleet. Fleet names do not need to be unique.

--description (string)

A human-readable description of the fleet.

--build-id (string)

The unique identifier for a custom game server build to be deployed on fleet instances. You can use either the build ID or ARN. The build must be uploaded to GameLift and in READY status. This fleet property cannot be changed later.

--script-id (string)

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 GameLift prior to creating the fleet. This fleet property cannot be changed later.

--server-launch-path (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.

--server-launch-parameters (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.

--log-paths (list)

This parameter is no longer used. To specify where GameLift should store log files once a server process shuts down, use the GameLift server API ProcessReady() and specify one or more directory paths in logParameters . See more information in the Server API Reference .

(string)

Syntax:

"string" "string" ...

--ec2-instance-type (string)

The GameLift-supported Amazon EC2 instance type to use for all fleet instances. 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.

Possible values:

  • 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

--ec2-inbound-permissions (list)

The allowed IP address ranges and port settings that allow inbound traffic to access game sessions on this fleet. If the fleet is hosting a custom game build, this property must be set before players can connect to game sessions. For Realtime Servers fleets, GameLift automatically sets TCP and UDP ranges.

(structure)

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.

Related actions

DescribeFleetPortSettings

FromPort -> (integer)

A starting value for a range of allowed port numbers.

For fleets using Windows and Linux builds, only ports 1026-60000 are valid.

ToPort -> (integer)

An ending value for a range of allowed port numbers. Port numbers are end-inclusive. This value must be higher than FromPort .

For fleets using Windows and Linux builds, only ports 1026-60000 are valid.

IpRange -> (string)

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)

The network communication protocol used by the fleet.

Shorthand Syntax:

FromPort=integer,ToPort=integer,IpRange=string,Protocol=string ...

JSON Syntax:

[
  {
    "FromPort": integer,
    "ToPort": integer,
    "IpRange": "string",
    "Protocol": "TCP"|"UDP"
  }
  ...
]

--new-game-session-protection-policy (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.

Possible values:

  • NoProtection

  • FullProtection

--runtime-configuration (structure)

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.

Note

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.

ServerProcesses -> (list)

A collection of server process configurations that identify what server processes to run on each instance in a fleet.

(structure)

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. Server process configurations are part of a fleet’s RuntimeConfiguration .

LaunchPath -> (string)

The location of a game build executable or the Realtime script file that contains the Init() function. 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

Parameters -> (string)

An optional list of parameters to pass to the server executable or Realtime script on launch.

ConcurrentExecutions -> (integer)

The number of server processes using this configuration that run concurrently on each instance.

MaxConcurrentGameSessionActivations -> (integer)

The number of game sessions in status ACTIVATING to allow on an instance. 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 to TERMINATED .

Shorthand Syntax:

ServerProcesses=[{LaunchPath=string,Parameters=string,ConcurrentExecutions=integer},{LaunchPath=string,Parameters=string,ConcurrentExecutions=integer}],MaxConcurrentGameSessionActivations=integer,GameSessionActivationTimeoutSeconds=integer

JSON Syntax:

{
  "ServerProcesses": [
    {
      "LaunchPath": "string",
      "Parameters": "string",
      "ConcurrentExecutions": integer
    }
    ...
  ],
  "MaxConcurrentGameSessionActivations": integer,
  "GameSessionActivationTimeoutSeconds": integer
}

--resource-creation-limit-policy (structure)

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)

The maximum number of game sessions that an individual can create during the policy period.

PolicyPeriodInMinutes -> (integer)

The time span used in evaluating the resource creation limit policy.

Shorthand Syntax:

NewGameSessionsPerCreator=integer,PolicyPeriodInMinutes=integer

JSON Syntax:

{
  "NewGameSessionsPerCreator": integer,
  "PolicyPeriodInMinutes": integer
}

--metric-groups (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)

Syntax:

"string" "string" ...

--peer-vpc-aws-account-id (string)

Used when peering your 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.

--peer-vpc-id (string)

A unique identifier for a VPC with resources to be accessed by your 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 GameLift Fleets .

--fleet-type (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 property cannot be changed after the fleet is created.

Possible values:

  • ON_DEMAND

  • SPOT

--instance-role-arn (string)

A unique identifier for an IAM role that manages access to your Amazon Web Services 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 in the Amazon Web Services Management Console. Learn more about using on-box credentials for your game servers at Access external resources from a game server . This property cannot be changed after the fleet is created.

--certificate-configuration (structure)

Prompts GameLift to generate a TLS/SSL certificate for the fleet. TLS certificates are used for encrypting traffic between game clients and the game servers that are running on GameLift. By default, the CertificateConfiguration is set to DISABLED . This property cannot be changed after the fleet is created.

Note: This feature requires the Amazon Web Services Certificate Manager (ACM) service, which is not available in all Amazon Web Services regions. When working in a region that does not support this feature, a fleet creation request with certificate generation fails with a 4xx error.

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.

Shorthand Syntax:

CertificateType=string

JSON Syntax:

{
  "CertificateType": "DISABLED"|"GENERATED"
}

--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 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 . To create a fleet with instances in the home Region only, omit this parameter.

(structure)

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

Related actions

CreateFleet

Location -> (string)

An Amazon Web Services Region code, such as us-west-2 .

Shorthand Syntax:

Location=string ...

JSON Syntax:

[
  {
    "Location": "string"
  }
  ...
]

--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 . Once the fleet is created, you can use TagResource , UntagResource , and ListTagsForResource to add, remove, and view tags. The maximum tag limit may be lower than stated. See the Amazon Web Services General Reference for actual tagging limits.

(structure)

A label that can be assigned to a GameLift resource.

Learn more

Tagging Amazon Web Services Resources in the Amazon Web Services General Reference

Amazon Web Services Tagging Strategies

Related actions

TagResource | UntagResource | ListTagsForResource | All APIs by task

Key -> (string)

The key for a developer-defined key:value pair for tagging an Amazon Web Services resource.

Value -> (string)

The value for a developer-defined key:value pair for tagging an Amazon Web Services resource.

Shorthand Syntax:

Key=string,Value=string ...

JSON Syntax:

[
  {
    "Key": "string",
    "Value": "string"
  }
  ...
]

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.

Global Options

--debug (boolean)

Turn on debug logging.

--endpoint-url (string)

Override command’s default URL with the given URL.

--no-verify-ssl (boolean)

By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.

--no-paginate (boolean)

Disable automatic pagination.

--output (string)

The formatting style for command output.

  • json

  • text

  • table

  • yaml

  • yaml-stream

--query (string)

A JMESPath query to use in filtering the response data.

--profile (string)

Use a specific profile from your credential file.

--region (string)

The region to use. Overrides config/env settings.

--version (string)

Display the version of this tool.

--color (string)

Turn on/off color output.

  • on

  • off

  • auto

--no-sign-request (boolean)

Do not sign requests. Credentials will not be loaded if this argument is provided.

--ca-bundle (string)

The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.

--cli-read-timeout (int)

The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.

--cli-connect-timeout (int)

The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.

--cli-binary-format (string)

The formatting style to be used for binary blobs. The default format is base64. The base64 format expects binary blobs to be provided as a base64 encoded string. The raw-in-base64-out format preserves compatibility with AWS CLI V1 behavior and binary values must be passed literally. When providing contents from a file that map to a binary blob fileb:// will always be treated as binary and use the file contents directly regardless of the cli-binary-format setting. When using file:// the file contents will need to properly formatted for the configured cli-binary-format.

  • base64

  • raw-in-base64-out

--no-cli-pager (boolean)

Disable cli pager for output.

--cli-auto-prompt (boolean)

Automatically prompt for CLI input parameters.

--no-cli-auto-prompt (boolean)

Disable automatically prompt for CLI input parameters.

Examples

Note

To use the following examples, you must have the AWS CLI installed and configured. See the Getting started guide in the AWS CLI User Guide for more information.

Unless otherwise stated, all examples have unix-like quotation rules. These examples will need to be adapted to your terminal’s quoting rules. See Using quotation marks with strings in the AWS CLI User Guide .

Example 1: To create a basic Linux fleet

The following create-fleet example creates a minimally configured fleet of on-demand Linux instances to host a custom server build. You can complete the configuration by using update-fleet.

aws gamelift create-fleet \
    --name MegaFrogRaceServer.NA.v2 \
    --description 'Hosts for v2 North America' \
    --build-id build-1111aaaa-22bb-33cc-44dd-5555eeee66ff \
    --certificate-configuration 'CertificateType=GENERATED' \
    --ec2-instance-type c4.large \
    --fleet-type ON_DEMAND \
    --runtime-configuration 'ServerProcesses=[{LaunchPath=/local/game/release-na/MegaFrogRace_Server.exe,ConcurrentExecutions=1}]'

Output:

{
    "FleetAttributes": {
        "BuildId": "build-1111aaaa-22bb-33cc-44dd-5555eeee66ff",
        "CertificateConfiguration": {
            "CertificateType": "GENERATED"
        },
        "CreationTime": 1496365885.44,
        "Description": "Hosts for v2 North America",
        "FleetArn": "arn:aws:gamelift:us-west-2:444455556666:fleet/fleet-2222bbbb-33cc-44dd-55ee-6666ffff77aa",
        "FleetId": "fleet-2222bbbb-33cc-44dd-55ee-6666ffff77aa",
        "FleetType": "ON_DEMAND",
        "InstanceType": "c4.large",
        "MetricGroups": ["default"],
        "Name": "MegaFrogRace.NA.v2",
        "NewGameSessionProtectionPolicy": "NoProtection",
        "OperatingSystem": "AMAZON_LINUX",
        "ServerLaunchPath": "/local/game/release-na/MegaFrogRace_Server.exe",
        "Status": "NEW"
    }
}

Example 2: To create a basic Windows fleet

The following create-fleet example creates a minimally configured fleet of spot Windows instances to host a custom server build. You can complete the configuration by using update-fleet.

aws gamelift create-fleet \
    --name MegaFrogRace.NA.v2 \
    --description 'Hosts for v2 North America' \
    --build-id build-2222aaaa-33bb-44cc-55dd-6666eeee77ff  \
    --certificate-configuration 'CertificateType=GENERATED' \
    --ec2-instance-type c4.large \
    --fleet-type SPOT \
    --runtime-configuration 'ServerProcesses=[{LaunchPath=C:\game\Bin64.Release.Dedicated\MegaFrogRace_Server.exe,ConcurrentExecutions=1}]'

Output:

{
    "FleetAttributes": {
        "BuildId": "build-2222aaaa-33bb-44cc-55dd-6666eeee77ff",
        "CertificateConfiguration": {
            "CertificateType": "GENERATED"
        },
        "CreationTime": 1496365885.44,
        "Description": "Hosts for v2 North America",
        "FleetArn": "arn:aws:gamelift:us-west-2:444455556666:fleet/fleet-2222bbbb-33cc-44dd-55ee-6666ffff77aa",
        "FleetId": "fleet-2222bbbb-33cc-44dd-55ee-6666ffff77aa",
        "FleetType": "SPOT",
        "InstanceType": "c4.large",
        "MetricGroups": ["default"],
        "Name": "MegaFrogRace.NA.v2",
        "NewGameSessionProtectionPolicy": "NoProtection",
        "OperatingSystem": "WINDOWS_2012",
        "ServerLaunchPath": "C:\game\Bin64.Release.Dedicated\MegaFrogRace_Server.exe",
        "Status": "NEW"
    }
}

Example 3: To create a fully configured fleet

The following create-fleet example creates a fleet of Spot Windows instances for a custom server build, with most commonly used configuration settings provided.

aws gamelift create-fleet \
    --name MegaFrogRace.NA.v2 \
    --description 'Hosts for v2 North America' \
    --build-id build-2222aaaa-33bb-44cc-55dd-6666eeee77ff \
    --certificate-configuration 'CertificateType=GENERATED' \
    --ec2-instance-type c4.large \
    --ec2-inbound-permissions 'FromPort=33435,ToPort=33435,IpRange=10.24.34.0/23,Protocol=UDP' \
    --fleet-type SPOT \
    --new-game-session-protection-policy FullProtection \
    --runtime-configuration file://runtime-config.json \
    --metric-groups default \
    --instance-role-arn 'arn:aws:iam::444455556666:role/GameLiftS3Access'

Contents of runtime-config.json:

GameSessionActivationTimeoutSeconds=300,
 MaxConcurrentGameSessionActivations=2,
 ServerProcesses=[
   {LaunchPath=C:\game\Bin64.Release.Dedicated\MegaFrogRace_Server.exe,Parameters=-debug,ConcurrentExecutions=1},
   {LaunchPath=C:\game\Bin64.Release.Dedicated\MegaFrogRace_Server.exe,ConcurrentExecutions=1}]

Output:

{
    "FleetAttributes": {
        "InstanceRoleArn": "arn:aws:iam::444455556666:role/GameLiftS3Access",
        "Status": "NEW",
        "InstanceType": "c4.large",
        "FleetArn": "arn:aws:gamelift:us-west-2:444455556666:fleet/fleet-2222bbbb-33cc-44dd-55ee-6666ffff77aa",
        "FleetId": "fleet-2222bbbb-33cc-44dd-55ee-6666ffff77aa",
        "Description": "Hosts for v2 North America",
        "FleetType": "SPOT",
        "OperatingSystem": "WINDOWS_2012",
        "Name": "MegaFrogRace.NA.v2",
        "CreationTime": 1569309011.11,
        "MetricGroups": [
            "default"
        ],
        "BuildId": "build-2222aaaa-33bb-44cc-55dd-6666eeee77ff",
        "ServerLaunchParameters": "abc",
        "ServerLaunchPath": "C:\\game\\Bin64.Release.Dedicated\\MegaFrogRace_Server.exe",
        "NewGameSessionProtectionPolicy": "FullProtection",
        "CertificateConfiguration": {
            "CertificateType": "GENERATED"
        }
    }
}

Example 4: To create a Realtime Servers fleet

The following create-fleet example creates a fleet of Spot instances with a Realtime configuration script that has been uploaded to Amazon GameLift. All Realtime servers are deployed onto Linux machines. For the purposes of this example, assume that the uploaded Realtime script includes multiple script files, with the Init() function located in the script file called MainScript.js. As shown, this file is identified as the launch script in the runtime configuration.

aws gamelift create-fleet \
    --name MegaFrogRace.NA.realtime \
    --description 'Mega Frog Race Realtime fleet' \
    --script-id script-1111aaaa-22bb-33cc-44dd-5555eeee66ff \
    --ec2-instance-type c4.large \
    --fleet-type SPOT \
    --certificate-configuration 'CertificateType=GENERATED' --runtime-configuration 'ServerProcesses=[{LaunchPath=/local/game/MainScript.js,Parameters=+map Winter444,ConcurrentExecutions=5}]'

Output:

{
    "FleetAttributes": {
        "FleetId": "fleet-2222bbbb-33cc-44dd-55ee-6666ffff77aa",
        "Status": "NEW",
        "CreationTime": 1569310745.212,
        "InstanceType": "c4.large",
        "NewGameSessionProtectionPolicy": "NoProtection",
        "CertificateConfiguration": {
            "CertificateType": "GENERATED"
        },
        "Name": "MegaFrogRace.NA.realtime",
        "ScriptId": "script-1111aaaa-22bb-33cc-44dd-5555eeee66ff",
        "FleetArn": "arn:aws:gamelift:us-west-2:444455556666:fleet/fleet-2222bbbb-33cc-44dd-55ee-6666ffff77aa",
        "FleetType": "SPOT",
        "MetricGroups": [
            "default"
        ],
        "Description": "Mega Frog Race Realtime fleet",
        "OperatingSystem": "AMAZON_LINUX"
    }
}

Output

FleetAttributes -> (structure)

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 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 the FleetId value.

FleetType -> (string)

The kind of instances, On-Demand or Spot, that this fleet uses.

InstanceType -> (string)

The Amazon EC2 instance type that determines the computing resources of each instance in the fleet. Instance type defines the CPU, memory, storage, and networking capacity. See Amazon Elastic Compute Cloud Instance Types for detailed descriptions.

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 -> (timestamp)

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 -> (timestamp)

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 – 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.

BuildArn -> (string)

The Amazon Resource Name (ARN ) associated with the GameLift build resource that is deployed on instances in this fleet. In a GameLift build ARN, the resource ID matches the BuildId value.

ScriptId -> (string)

A unique identifier for the Realtime script resource that is deployed on instances in this fleet.

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 parameter. Requests that use this parameter instead continue to be valid.

ServerLaunchParameters -> (string)

This parameter is no longer used. Server launch parameters are now defined using the fleet’s RuntimeConfiguration parameter. Requests that use this parameter instead continue to be valid.

LogPaths -> (list)

This parameter is no longer used. Game session log paths are now defined using the 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.

  • 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.

ResourceCreationLimitPolicy -> (structure)

The fleet policy that limits the number of game sessions an individual player can create over a span of time.

NewGameSessionsPerCreator -> (integer)

The maximum number of game sessions that an individual can create during the policy 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.

(string)

StoppedActions -> (list)

A list of fleet activity that has been suspended using StopFleetActions . This includes fleet auto-scaling.

(string)

InstanceRoleArn -> (string)

A unique identifier for an IAM role that manages access to your Amazon Web Services 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 in the Amazon Web Services Management Console. Learn more about using on-box credentials for your game servers at Access external resources from a game server .

CertificateConfiguration -> (structure)

Indicates whether a TLS/SSL certificate was generated for the fleet.

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.

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, 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.

(structure)

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.

Related actions

CreateFleet | CreateFleetLocations | DeleteFleetLocations

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.