v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-14104474602.4 KB

Creates a fleet of Amazon Elastic Compute Cloud (Amazon EC2) 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 Amazon 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 Amazon 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 Amazon 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 Amazon GameLift to initiate the fleet creation workflow.

Learn more

Setting up fleets

Debug fleet creation issues

Multi-location fleets

post/#X-Amz-Target=GameLift.CreateFleet

Headers

X-Amz-Target'GameLift.CreateFleet' required

Request body

Namestring required

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

Descriptionstring

A description for the fleet.

BuildIdstring

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 Amazon GameLift and in <code>READY</code> status. This fleet property cannot be changed later.

ScriptIdstring

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

ServerLaunchPathstring

<b>This parameter is no longer used.</b> Specify a server launch path using the <code>RuntimeConfiguration</code> parameter. Requests that use this parameter instead continue to be valid.

ServerLaunchParametersstring

<b>This parameter is no longer used.</b> Specify server launch parameters using the <code>RuntimeConfiguration</code> parameter. Requests that use this parameter instead continue to be valid.

LogPathsNonZeroAndMaxString[]

<b>This parameter is no longer used.</b> To specify where Amazon GameLift should store log files once a server process shuts down, use the Amazon GameLift server API <code>ProcessReady()</code> and specify one or more directory paths in <code>logParameters</code>. For more information, see <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-initialize">Initialize the server process</a> in the <i>Amazon GameLift Developer Guide</i>.

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'

The Amazon 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 <a href="http://aws.amazon.com/ec2/instance-types/">Amazon Elastic Compute Cloud Instance Types</a> for detailed descriptions of Amazon EC2 instance types.

NewGameSessionProtectionPolicy'NoProtection' | 'FullProtection'
<p>The status of termination protection for active game sessions on the fleet. By default, this property is set to <code>NoProtection</code>. You can also set game session protection for an individual game session by calling <a href="gamelift/latest/apireference/API_UpdateGameSession.html">UpdateGameSession</a>.</p> <ul> <li> <p> <b>NoProtection</b> - Game sessions can be terminated during active gameplay as a result of a scale-down event. </p> </li> <li> <p> <b>FullProtection</b> - Game sessions in <code>ACTIVE</code> status cannot be terminated during a scale-down event.</p> </li> </ul>
MetricGroupsMetricGroup[]

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.

PeerVpcAwsAccountIdstring

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.

PeerVpcIdstring

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 <a href="https://console.aws.amazon.com/vpc/">VPC Dashboard</a> in the Amazon Web Services Management Console. Learn more about VPC peering in <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html">VPC Peering with Amazon GameLift Fleets</a>.

FleetType'ON_DEMAND' | 'SPOT'

Indicates whether to use On-Demand or Spot instances for this fleet. By default, this property is set to <code>ON_DEMAND</code>. Learn more about when to use <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-ec2-instances.html#gamelift-ec2-instances-spot"> On-Demand versus Spot Instances</a>. This property cannot be changed after the fleet is created.

InstanceRoleArnstring

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 <a href="https://console.aws.amazon.com/iam/">IAM dashboard</a> in the Amazon Web Services Management Console. Learn more about using on-box credentials for your game servers at <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-resources.html"> Access external resources from a game server</a>. This property cannot be changed after the fleet is created.

ComputeType'EC2' | 'ANYWHERE'

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. By default, this property is set to <code>EC2</code>.

Response

Success