Updating an Amazon Cloud Map service - 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).

Updating an Amazon Cloud Map service

To update 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. On the Namespaces page, choose the namespace that you want to edit the service for.

  4. On the Namespace: namespace-name page, select the service you want to edit and click Edit.

  5. On the Service: service-name page, click Edit.

  6. On the Edit service page, enter the applicable values.

  7. Click Update service.

Amazon CLI
  • Update a service with the update-service command (replace the red value with your own).

    aws servicediscovery update-service \ --id srv-xxxxxxxxxxx \ --service "Description=new description,DnsConfig={DnsRecords=[{Type=A,TTL=60}]}"


    { "OperationId": "l3pfx7f4ynndrbj3cfq5fm2qy2z37bms-5m6iaoty" }
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. Update a service with update_service() (replace the red value with your own).

    response = client.update_service( Id='srv-xxxxxxxxxxx', Service={ 'DnsConfig': { 'DnsRecords': [ { 'TTL': 300, 'Type': 'A', }, ], }, 'Description': "new description", } )

    Example response output

    { "OperationId": "l3pfx7f4ynndrbj3cfq5fm2qy2z37bms-5m6iaoty" }