GameLift / Client / get_instance_access

get_instance_access#

GameLift.Client.get_instance_access(**kwargs)#

Requests remote access to a fleet instance. Remote access is useful for debugging, gathering benchmarking data, or observing activity in real time.

To remotely access an instance, you need credentials that match the operating system of the instance. For a Windows instance, Amazon GameLift returns a user name and password as strings for use with a Windows Remote Desktop client. For a Linux instance, Amazon GameLift returns a user name and RSA private key, also as strings, for use with an SSH client. The private key must be saved in the proper format to a .pem file before using. If you’re making this request using the CLI, saving the secret can be handled as part of the GetInstanceAccess request, as shown in one of the examples for this operation.

To request access to a specific instance, specify the IDs of both the instance and the fleet it belongs to. You can retrieve a fleet’s instance IDs by calling DescribeInstances.

Learn more

Remotely Access Fleet Instances

Debug Fleet Issues

Related actions

All APIs by task

See also: AWS API Documentation

Request Syntax

response = client.get_instance_access(
    FleetId='string',
    InstanceId='string'
)
Parameters:
  • FleetId (string) –

    [REQUIRED]

    A unique identifier for the fleet that contains the instance you want access to. You can use either the fleet ID or ARN value. The fleet can be in any of the following statuses: ACTIVATING, ACTIVE, or ERROR. Fleets with an ERROR status may be accessible for a short time before they are deleted.

  • InstanceId (string) –

    [REQUIRED]

    A unique identifier for the instance you want to get access to. You can access an instance in any status.

Return type:

dict

Returns:

Response Syntax

{
    'InstanceAccess': {
        'FleetId': 'string',
        'InstanceId': 'string',
        'IpAddress': 'string',
        'OperatingSystem': 'WINDOWS_2012'|'AMAZON_LINUX'|'AMAZON_LINUX_2'|'WINDOWS_2016',
        'Credentials': {
            'UserName': 'string',
            'Secret': 'string'
        }
    }
}

Response Structure

  • (dict) –

    • InstanceAccess (dict) –

      The connection information for a fleet instance, including IP address and access credentials.

      • FleetId (string) –

        A unique identifier for the fleet containing the instance being accessed.

      • InstanceId (string) –

        A unique identifier for the instance being accessed.

      • IpAddress (string) –

        IP address that is assigned to the instance.

      • OperatingSystem (string) –

        Operating system that is running on the instance.

      • Credentials (dict) –

        Credentials required to access the instance.

        • UserName (string) –

          User login string.

        • Secret (string) –

          Secret string. For Windows instances, the secret is a password for use with Windows Remote Desktop. For Linux instances, it is a private key (which must be saved as a .pem file) for use with SSH.

Exceptions

  • GameLift.Client.exceptions.UnauthorizedException

  • GameLift.Client.exceptions.InvalidRequestException

  • GameLift.Client.exceptions.NotFoundException

  • GameLift.Client.exceptions.InternalServiceException