Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . gamelift ]

create-fleet

Description

Creates a new fleet to run your game servers. A fleet is a set of Amazon Elastic Compute Cloud (Amazon EC2) instances, each of which can run multiple server processes to host game sessions. You set up a fleet to use instances with certain hardware specifications (see Amazon EC2 Instance Types for more information), and deploy your game build to run on each instance.

To create a new fleet, you must specify the following: (1) a fleet name, (2) the build ID of a successfully uploaded game build, (3) an EC2 instance type, and (4) a run-time configuration, which describes the server processes to run on each instance in the fleet. If you don't specify a fleet type (on-demand or spot), the new fleet uses on-demand instances by default.

You can also configure the new fleet with the following settings:

If you use Amazon CloudWatch for metrics, you can add the new fleet to a metric group. By adding multiple fleets to a metric group, you can view aggregated metrics for all the fleets in the group.

If the create-fleet call is successful, Amazon GameLift performs the following tasks. You can track the process of a fleet by checking the fleet status or by monitoring fleet creation events:

  • Creates a fleet record. Status: NEW .
  • Begins writing events to the fleet event log, which can be accessed in the Amazon GameLift console. Sets the fleet's target capacity to 1 (desired instances), which triggers Amazon GameLift to start one new EC2 instance.
  • Downloads the game build to the new instance and installs it. Statuses: DOWNLOADING , VALIDATING , BUILDING .
  • Starts launching server processes on the instance. If the fleet is configured to run multiple server processes per instance, Amazon GameLift staggers each launch by a few seconds. Status: ACTIVATING .
  • Sets the fleet's status to ACTIVE as soon as one server process is ready to host a game session.

Fleet-related operations include:

  • create-fleet
  • list-fleets
  • delete-fleet
  • Describe fleets:
    • describe-fleet-attributes
    • describe-fleet-capacity
    • describe-fleet-port-settings
    • describe-fleet-utilization
    • describe-runtime-configuration
    • describe-ec2-instance-limits
    • describe-fleet-events
  • Update fleets:
    • update-fleet-attributes
    • update-fleet-capacity
    • update-fleet-port-settings
    • update-runtime-configuration
  • Manage fleet actions:
    • start-fleet-actions
    • stop-fleet-actions

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  create-fleet
--name <value>
[--description <value>]
--build-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>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--name (string)

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

--description (string)

Human-readable description of a fleet.

--build-id (string)

Unique identifier for a build to be deployed on the new fleet. 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.

--server-launch-path (string)

This parameter is no longer used. Instead, specify a server launch path using the runtime-configuration parameter. (Requests that specify a server launch path and launch parameters instead of a run-time configuration will continue to work.)

--server-launch-parameters (string)

This parameter is no longer used. Instead, specify server launch parameters in the runtime-configuration parameter. (Requests that specify a server launch path and launch parameters instead of a run-time configuration will continue to work.)

--log-paths (list)

This parameter is no longer used. Instead, 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 in logParameters . See more information in the Server API Reference .

Syntax:

"string" "string" ...

--ec2-instance-type (string)

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.

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
  • r3.large
  • r3.xlarge
  • r3.2xlarge
  • r3.4xlarge
  • r3.8xlarge
  • r4.large
  • r4.xlarge
  • r4.2xlarge
  • r4.4xlarge
  • r4.8xlarge
  • r4.16xlarge
  • m3.medium
  • m3.large
  • m3.xlarge
  • m3.2xlarge
  • m4.large
  • m4.xlarge
  • m4.2xlarge
  • m4.4xlarge
  • m4.10xlarge

--ec2-inbound-permissions (list)

Range of IP addresses and port settings that permit inbound traffic to access server processes running on the fleet. If no inbound permissions are set, including both IP address range and port range, the server processes in the fleet cannot accept connections. You can specify one or more sets of permissions for a 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)

Game session protection policy to apply to all instances in this fleet. If this parameter is not set, instances in this fleet default to no protection. You can change a fleet's protection policy using update-fleet-attributes , but this change will only affect sessions created after the policy change. You can also set protection for individual instances using update-game-session .

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

Possible values:

  • NoProtection
  • FullProtection

--runtime-configuration (structure)

Instructions for launching server processes on each instance in the fleet. The run-time configuration for a fleet has a collection of server process configurations, one for each type of server process to run on an instance. A server process configuration specifies the location of the server executable, launch parameters, and the number of concurrent processes with that configuration to maintain on each instance. A create-fleet request must include a run-time configuration with at least one server process configuration; otherwise the request fails with an invalid request exception. (This parameter replaces the parameters ServerLaunchPath and ServerLaunchParameters ; requests that contain values for these parameters instead of a run-time configuration will continue to work.)

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)

Policy that limits the number of game sessions an individual player can create over a span of time for this fleet.

Shorthand Syntax:

NewGameSessionsPerCreator=integer,PolicyPeriodInMinutes=integer

JSON Syntax:

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

--metric-groups (list)

Name of a metric group to add this fleet to. A metric group tracks metrics across all fleets in the group. Use an existing metric group name to add this fleet to the group, or use a new name to create a new metric group. A fleet can only be included in one metric group at a time.

Syntax:

"string" "string" ...

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

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)

Unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same region where your fleet is deployed. To get VPC information, including IDs, use the Virtual Private Cloud service tools, including the VPC Dashboard in the AWS Management Console.

--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. You can acquire on-demand instances at any time for a fixed price and keep them as long as you need them. Spot instances have lower prices, but spot pricing is variable, and while in use they can be interrupted (with a two-minute notification). Learn more about Amazon GameLift spot instances with at Choose Computing Resources .

Possible values:

  • ON_DEMAND
  • SPOT

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values.

--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. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Output

FleetAttributes -> (structure)

Properties for the newly created fleet.

FleetId -> (string)

Unique identifier for a fleet.

FleetArn -> (string)

Identifier for a fleet that is unique across all regions.

FleetType -> (string)

Indicates whether the fleet uses on-demand or spot instances. A spot instance in use may be interrupted with a two-minute notification.

InstanceType -> (string)

EC2 instance type indicating the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. See Amazon EC2 Instance Types for detailed descriptions.

Description -> (string)

Human-readable description of the fleet.

Name -> (string)

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

CreationTime -> (timestamp)

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)

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

Unique identifier for a build.

ServerLaunchPath -> (string)

Path to a game server executable in the fleet's build, specified for fleets created before 2016-08-04 (or AWS SDK v. 0.12.16). Server launch paths for fleets created after this date are specified in the fleet's runtime-configuration .

ServerLaunchParameters -> (string)

Game server launch parameters specified for fleets created before 2016-08-04 (or AWS SDK v. 0.12.16). Server launch parameters for fleets created after this date are specified in the fleet's runtime-configuration .

LogPaths -> (list)

Location of default log files. When a server process is shut down, Amazon GameLift captures and stores any log files in this location. These logs are in addition to game session logs; see more on game session logs in the Amazon GameLift Developer Guide . If no default log path for a fleet is specified, Amazon GameLift automatically uploads logs that are stored on each instance at C:\game\logs (for Windows) or /local/game/logs (for Linux). Use the Amazon GameLift console to access stored logs.

(string)

NewGameSessionProtectionPolicy -> (string)

Type of game session protection to set for all new instances 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)

Operating system of the fleet's computing resources. A fleet's operating system depends on the OS specified for the build that is deployed on this fleet.

ResourceCreationLimitPolicy -> (structure)

Fleet policy to limit the number of game sessions an individual player can create over a span of time.

NewGameSessionsPerCreator -> (integer)

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

PolicyPeriodInMinutes -> (integer)

Time span used in evaluating the resource creation limit policy.

MetricGroups -> (list)

Names of metric groups that this fleet is included in. In Amazon CloudWatch, you can view metrics for an individual fleet or aggregated metrics for fleets that are in a fleet metric group. A fleet can be included in only one metric group at a time.

(string)

StoppedActions -> (list)

List of fleet actions that have been suspended using stop-fleet-actions . This includes auto-scaling.

(string)