Skip to main content

builds

Creates, updates, deletes, gets or lists a builds resource.

Overview

Namebuilds
TypeResource
Idaws.gamelift.builds

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
build_arnstringThe Amazon Resource Name (ARN) that is assigned to a Amazon GameLift Servers build resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::build/build-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912. In a GameLift build ARN, the resource ID matches the BuildId value. (pattern: <code>^arn:.*:build/build-\S+$</code>)
build_idstringA unique identifier for the build. (pattern: <code>^build-\S+$</code>)
creation_timestring (date-time)A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
namestringA descriptive label that is associated with a build. Build names do not need to be unique. It can be set using CreateBuild or UpdateBuild.
operating_systemstringOperating system that the game server binaries are built to run on. This value determines the type of fleet resources that you can use for this build. Amazon Linux 2 (AL2) will reach end of support on 6/30/2026. See more details in the Amazon Linux 2 FAQs. For game servers that are hosted on AL2 and use server SDK version 4.x for Amazon GameLift Servers, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See Migrate to server SDK version 5. (WINDOWS_2012, AMAZON_LINUX, AMAZON_LINUX_2, WINDOWS_2016, AMAZON_LINUX_2023, WINDOWS_2022)
server_sdk_versionstringThe Amazon GameLift Servers Server SDK version used to develop your game server. (pattern: <code>^\d+.\d+.\d+$</code>)
size_on_diskinteger (int64)File size of the uploaded game build, expressed in bytes. When the build status is INITIALIZED or when using a custom Amazon S3 storage location, this value is 0.
statusstringCurrent status of the build. Possible build statuses include the following: INITIALIZED -- A new build has been defined, but no files have been uploaded. You cannot create fleets for builds that are in this status. When a build is successfully created, the build status is set to this value. READY -- The game build has been successfully uploaded. You can now create new fleets for this build. FAILED -- The game build upload failed. You cannot create new fleets for this build. (INITIALIZED, READY, FAILED)
versionstringVersion information that is associated with a build or script. Version strings do not need to be unique.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_buildselectregionThis API works with the following fleet types: EC2 Retrieves properties for a custom game build. To request a build resource, specify a build ID. If successful, an object containing the build properties is returned. Learn more Upload a Custom Server Build All APIs by task
list_buildsselectregionThis API works with the following fleet types: EC2 Retrieves build resources for all builds associated with the Amazon Web Services account in use. You can limit results to builds that are in a specific status by using the Status parameter. Use the pagination parameters to retrieve results in Build resources are not listed in any particular order. Learn more Upload a Custom Server Build All APIs by task
create_buildinsertregionThis API works with the following fleet types: EC2, Anywhere Creates a new Amazon GameLift Servers build resource for your game server binary files. Combine game server binaries into a zip file for use with Amazon GameLift Servers. When setting up a new game build for Amazon GameLift Servers, we recommend using the CLI command upload-build . This helper command combines two tasks: (1) it uploads your build files from a file directory to an Amazon GameLift Servers Amazon S3 location, and (2) it creates a new build resource. You can use the CreateBuild operation in the following scenarios: Create a new game build with build files that are in an Amazon S3 location under an Amazon Web Services account that you control. To use this option, you give Amazon GameLift Servers access to the Amazon S3 bucket. With permissions in place, specify a build name, operating system, and the Amazon S3 storage location of your game build. Upload your build files to a Amazon GameLift Servers Amazon S3 location. To use this option, specify a build name and operating system. This operation creates a new build resource and also returns an Amazon S3 location with temporary access credentials. Use the credentials to manually upload your build files to the specified Amazon S3 location. For more information, see Uploading Objects in the Amazon S3 Developer Guide. After you upload build files to the Amazon GameLift Servers Amazon S3 location, you can't update them. If successful, this operation creates a new build resource with a unique build ID and places it in INITIALIZED status. A build must be in READY status before you can create fleets with it. Learn more Uploading Your Game Create a Build with Files in Amazon S3 All APIs by task
update_buildupdateregion, BuildIdThis API works with the following fleet types: EC2 Updates metadata in a build resource, including the build name and version. To update the metadata, specify the build ID to update and provide the new values. If successful, a build object containing the updated metadata is returned. Learn more Upload a Custom Server Build All APIs by task
delete_builddeleteregionThis API works with the following fleet types: EC2 Deletes a build. This operation permanently deletes the build resource and any uploaded build files. Deleting a build does not affect the status of any active fleets using the build, but you can no longer create new fleets with the deleted build. To delete a build, specify the build ID. Learn more Upload a Custom Server Build All APIs by task
request_upload_credentialsexecregion, BuildIdThis API works with the following fleet types: EC2 Retrieves a fresh set of credentials for use when uploading a new set of game build files to Amazon GameLift Servers's Amazon S3. This is done as part of the build creation process; see CreateBuild. To request new credentials, specify the build ID as returned with an initial CreateBuild request. If successful, a new set of credentials are returned, along with the S3 storage location associated with the build ID. Learn more Create a Build with Files in S3 All APIs by task

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

This API works with the following fleet types: EC2 Retrieves properties for a custom game build. To request a build resource, specify a build ID. If successful, an object containing the build properties is returned. Learn more Upload a Custom Server Build All APIs by task

SELECT
build_arn,
build_id,
creation_time,
name,
operating_system,
server_sdk_version,
size_on_disk,
status,
version
FROM aws.gamelift.builds
WHERE region = '{{ region }}' -- required
;

INSERT examples

This API works with the following fleet types: EC2, Anywhere Creates a new Amazon GameLift Servers build resource for your game server binary files. Combine game server binaries into a zip file for use with Amazon GameLift Servers. When setting up a new game build for Amazon GameLift Servers, we recommend using the CLI command upload-build . This helper command combines two tasks: (1) it uploads your build files from a file directory to an Amazon GameLift Servers Amazon S3 location, and (2) it creates a new build resource. You can use the CreateBuild operation in the following scenarios: Create a new game build with build files that are in an Amazon S3 location under an Amazon Web Services account that you control. To use this option, you give Amazon GameLift Servers access to the Amazon S3 bucket. With permissions in place, specify a build name, operating system, and the Amazon S3 storage location of your game build. Upload your build files to a Amazon GameLift Servers Amazon S3 location. To use this option, specify a build name and operating system. This operation creates a new build resource and also returns an Amazon S3 location with temporary access credentials. Use the credentials to manually upload your build files to the specified Amazon S3 location. For more information, see Uploading Objects in the Amazon S3 Developer Guide. After you upload build files to the Amazon GameLift Servers Amazon S3 location, you can't update them. If successful, this operation creates a new build resource with a unique build ID and places it in INITIALIZED status. A build must be in READY status before you can create fleets with it. Learn more Uploading Your Game Create a Build with Files in Amazon S3 All APIs by task

INSERT INTO aws.gamelift.builds (
Name,
Version,
StorageLocation,
OperatingSystem,
Tags,
ServerSdkVersion,
region
)
SELECT
'{{ Name }}',
'{{ Version }}',
'{{ StorageLocation }}',
'{{ OperatingSystem }}',
'{{ Tags }}',
'{{ ServerSdkVersion }}',
'{{ region }}'
RETURNING
build,
storage_location,
upload_credentials
;

UPDATE examples

This API works with the following fleet types: EC2 Updates metadata in a build resource, including the build name and version. To update the metadata, specify the build ID to update and provide the new values. If successful, a build object containing the updated metadata is returned. Learn more Upload a Custom Server Build All APIs by task

UPDATE aws.gamelift.builds
SET
BuildId = '{{ BuildId }}',
Name = '{{ Name }}',
Version = '{{ Version }}'
WHERE
region = '{{ region }}' --required
AND BuildId = '{{ BuildId }}' --required
RETURNING
build;

DELETE examples

This API works with the following fleet types: EC2 Deletes a build. This operation permanently deletes the build resource and any uploaded build files. Deleting a build does not affect the status of any active fleets using the build, but you can no longer create new fleets with the deleted build. To delete a build, specify the build ID. Learn more Upload a Custom Server Build All APIs by task

DELETE FROM aws.gamelift.builds
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

This API works with the following fleet types: EC2 Retrieves a fresh set of credentials for use when uploading a new set of game build files to Amazon GameLift Servers's Amazon S3. This is done as part of the build creation process; see CreateBuild. To request new credentials, specify the build ID as returned with an initial CreateBuild request. If successful, a new set of credentials are returned, along with the S3 storage location associated with the build ID. Learn more Create a Build with Files in S3 All APIs by task

EXEC aws.gamelift.builds.request_upload_credentials
@region='{{ region }}' --required
@@json=
'{
"BuildId": "{{ BuildId }}"
}'
;