Viewing your Amazon Cloud Map service instances - Amazon Cloud Map
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Viewing your Amazon Cloud Map service instances

To view a list of the service instances that you registered using a service, perform the following procedure.

Amazon Web Services Management Console
  1. Sign in to the Amazon Web Services Management Console and open the Amazon Cloud Map console at https://console.amazonaws.cn/cloudmap/.

  2. In the navigation pane, choose Namespaces.

  3. Choose the name of the namespace that contains the service for which you want to list service instances.

  4. Choose the name of the service that you used to create the service instances.

Amazon CLI
  • List service instances with the list-instances command (replace the red value with your own).

    aws servicediscovery list-instances --service-id srv-xxxxxxxxx
Amazon SDK for Python (Boto3)
  1. If you don't already have Boto3 installed, you can find instructions for installing, configuring, and using Boto3 here.

  2. Import Boto3 and use servicediscovery as your service.

    import boto3 client = boto3.client('servicediscovery')
  3. List service instances with list_instances() (replace the red value with your own).

    response = client.list_instances( ServiceId='srv-xxxxxxxxx', ) # If you want to see the response print(response)

    Example response output

    { 'Instances': [ { 'Attributes': { 'AWS_INSTANCE_IPV4': '172.2.1.3', 'AWS_INSTANCE_PORT': '808', }, 'Id': 'i-xxxxxxxxxxxxxxxxx', }, ], 'ResponseMetadata': { '...': '...', }, }