Amazon GameLift service API reference (AWS SDK) - Amazon GameLift

Amazon GameLift service API reference (AWS SDK)

This topic provides a task-based list of API operations for use with Amazon GameLift managed hosting solutions, including hosting for custom game servers and Realtime Servers. These operations are packaged into the AWS SDK in the aws.gamelift namespace.Download the AWS SDK or view the Amazon GameLift API reference documentation.

The API includes two sets of operations for managed game hosting:

The Amazon GameLift Service API also contains operations for use with other Amazon GameLift tools and solutions. For a list of FleetIQ APIs, see FleetIQ API actions. For a list of FlexMatch APIs for matchmaking, see FlexMatch API actions.

Set up and manage Amazon GameLift hosting resources

Call these operations to configure hosting resources for your game servers, scale capacity to meet player demand, access performance and utilization metrics, and more. These API operations are used with game servers that are hosted on Amazon GameLift, including Realtime Servers. You can use the Amazon GameLift console for most resource management tasks, or you can make calls to the service using the AWS Command Line Interface (AWS CLI) tool or the AWS SDK.

Prepare game servers for deployment

Upload and configure your game's game server code in preparation for deployment and launching on hosting resources.

Manage custom game server builds

  • upload-build – Upload build files from a local path and create a new Amazon GameLift build resource. This operation, available only as an AWS CLI command, is the most common method for uploading game server builds.

  • CreateBuild – Create a new build using files stored in an Amazon S3 bucket.

  • ListBuilds – Get a list of all builds uploaded to a Amazon GameLift region.

  • DescribeBuild – Retrieve information associated with a build.

  • UpdateBuild – Change build metadata, including build name and version.

  • DeleteBuild – Remove a build from Amazon GameLift.

Manage Realtime Servers configuration scripts

  • CreateScript – Upload JavaScript files and create a new Amazon GameLift script resource.

  • ListScripts – Get a list of all Realtime scripts uploaded to a Amazon GameLift region.

  • DescribeScript – Retrieve information associated with a Realtime script.

  • UpdateScript – Change script metadata and upload revised script content.

  • DeleteScript – Remove a Realtime script from Amazon GameLift.

Set up computing resources for hosting

Configure hosting resources and deploy them with your game server build or Realtime configuration script.

Create and manage fleets

Manage fleet capacity

Monitor fleet activity.

Set up queues for optimal game session placement

Set up multi-fleet, multi-region queues to place game sessions with the best available hosting resources for cost, latency, and resiliency.

Manage aliases

Use aliases to represent your fleets or create a terminal alternative destination. Aliases are useful when transitioning game activity from one fleet to another, such as during game server build updates.

  • CreateAlias – Define a new alias and optionally assign it to a fleet.

  • ListAliases – Get all fleet aliases defined in a Amazon GameLift region.

  • DescribeAlias – Retrieve information on an existing alias.

  • UpdateAlias – Change settings for an alias, such as redirecting it from one fleet to another.

  • DeleteAlias – Remove an alias from the region.

  • ResolveAlias – Get the fleet ID that a specified alias points to.

Access hosting instances

View information on individual instances in a fleet, or request remote access to a specified fleet instance for troubleshooting.

  • DescribeInstances – Get information on each instance in a fleet, including instance ID, IP address, location, and status.

  • GetInstanceAccess – Request access credentials needed to remotely connect to a specified instance in a fleet.

Set up VPC peering

Create and manage VPC peering connections between your Amazon GameLift hosting resources and other AWS resources.

Start game sessions and join players

Call these operations from your game client service to start new game sessions, get information on existing game sessions, and join players to game sessions. These operations are for use with custom game servers that are hosted on Amazon GameLift. If you're using Realtime Servers, manage game sessions using the Realtime Servers client API (C#) reference.

  • Start new game sessions for one or more players.

    • StartGameSessionPlacement – Ask Amazon GameLift to find the best available hosting resources and start a new game session. This is the preferred method for creating new game sessions. It relies on game session queues to track hosting availability across multiple regions, and uses FleetIQ algorithms to prioritize placements based on player latency, hosting cost, location, etc.

    • DescribeGameSessionPlacement – Get details and status on a placement request.

    • StopGameSessionPlacement – Cancel a placement request.

    • CreateGameSession – Start a new, empty game session on a specific fleet location. This operation gives you greater control over where to start the game session, instead of using FleetIQ to evaluate placement options. You must add players to the new game session in a separate step.

  • Get players into existing game sessions. Find running game sessions with available player slots and reserve them for new players.

  • Work with game session and player session data. Manage information on game sessions and player sessions.

    • SearchGameSessions – Request a list of active game sessions based on a set of search criteria.

    • DescribeGameSessions – Retrieve metadata for specific game sessions, including length of time active and current player count.

    • DescribeGameSessionDetails – Retrieve metadata, including the game session protection setting, for one or more game sessions.

    • DescribePlayerSessions – Get details on player activity, including status, playing time, and player data.

    • UpdateGameSession – Change game session settings, such as maximum player count and join policy.

    • GetGameSessionLogUrl – Get the location of saved logs for a game session.