GameLift / Client / request_upload_credentials

request_upload_credentials#

GameLift.Client.request_upload_credentials(**kwargs)#

Retrieves a fresh set of credentials for use when uploading a new set of game build files to Amazon GameLift’s Amazon S3. This is done as part of the build creation process; see GameSession.

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

See also: AWS API Documentation

Request Syntax

response = client.request_upload_credentials(
    BuildId='string'
)
Parameters:

BuildId (string) –

[REQUIRED]

A unique identifier for the build to get credentials for. You can use either the build ID or ARN value.

Return type:

dict

Returns:

Response Syntax

{
    'UploadCredentials': {
        'AccessKeyId': 'string',
        'SecretAccessKey': 'string',
        'SessionToken': 'string'
    },
    'StorageLocation': {
        'Bucket': 'string',
        'Key': 'string',
        'RoleArn': 'string',
        'ObjectVersion': 'string'
    }
}

Response Structure

  • (dict) –

    • UploadCredentials (dict) –

      Amazon Web Services credentials required when uploading a game build to the storage location. These credentials have a limited lifespan and are valid only for the build they were issued for.

      • AccessKeyId (string) –

        The access key ID that identifies the temporary security credentials.

      • SecretAccessKey (string) –

        The secret access key that can be used to sign requests.

      • SessionToken (string) –

        The token that users must pass to the service API to use the temporary credentials.

    • StorageLocation (dict) –

      Amazon S3 path and key, identifying where the game build files are stored.

      • Bucket (string) –

        An Amazon S3 bucket identifier. Thename of the S3 bucket.

        Note

        Amazon GameLift doesn’t support uploading from Amazon S3 buckets with names that contain a dot (.).

      • Key (string) –

        The name of the zip file that contains the build files or script files.

      • RoleArn (string) –

        The Amazon Resource Name ( ARN) for an IAM role that allows Amazon GameLift to access the S3 bucket.

      • ObjectVersion (string) –

        The version of the file, if object versioning is turned on for the bucket. Amazon GameLift uses this information when retrieving files from an S3 bucket that you own. Use this parameter to specify a specific version of the file. If not set, the latest version of the file is retrieved.

Exceptions