CodeDeploy / Client / list_deployment_instances




The newer BatchGetDeploymentTargets should be used instead because it works with all compute types. ListDeploymentInstances throws an exception if it is used with a compute platform other than EC2/On-premises or Lambda.

Lists the instance for a deployment associated with the user or Amazon Web Services account.


This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.

See also: AWS API Documentation

Request Syntax

response = client.list_deployment_instances(
  • deploymentId (string) –


    The unique ID of a deployment.

  • nextToken (string) – An identifier returned from the previous list deployment instances call. It can be used to return the next set of deployment instances in the list.

  • instanceStatusFilter (list) –

    A subset of instances to list by status:

    • Pending: Include those instances with pending deployments.

    • InProgress: Include those instances where deployments are still in progress.

    • Succeeded: Include those instances with successful deployments.

    • Failed: Include those instances with failed deployments.

    • Skipped: Include those instances with skipped deployments.

    • Unknown: Include those instances with deployments in an unknown state.

    • (string) –

  • instanceTypeFilter (list) –

    The set of instances in a blue/green deployment, either those in the original environment (“BLUE”) or those in the replacement environment (“GREEN”), for which you want to view instance information.

    • (string) –

Return type:



Response Syntax

    'instancesList': [
    'nextToken': 'string'

Response Structure

  • (dict) –

    Represents the output of a ListDeploymentInstances operation.

    • instancesList (list) –

      A list of instance IDs.

      • (string) –

    • nextToken (string) –

      If a large amount of information is returned, an identifier is also returned. It can be used in a subsequent list deployment instances call to return the next set of deployment instances in the list.


  • CodeDeploy.Client.exceptions.DeploymentIdRequiredException

  • CodeDeploy.Client.exceptions.DeploymentDoesNotExistException

  • CodeDeploy.Client.exceptions.DeploymentNotStartedException

  • CodeDeploy.Client.exceptions.InvalidNextTokenException

  • CodeDeploy.Client.exceptions.InvalidDeploymentIdException

  • CodeDeploy.Client.exceptions.InvalidInstanceStatusException

  • CodeDeploy.Client.exceptions.InvalidInstanceTypeException

  • CodeDeploy.Client.exceptions.InvalidDeploymentInstanceTypeException

  • CodeDeploy.Client.exceptions.InvalidTargetFilterNameException

  • CodeDeploy.Client.exceptions.InvalidComputePlatformException