Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Deleting an AWS Cloud Map service

Focus mode
Deleting an AWS Cloud Map service - AWS Cloud Map

Before you can delete a service, you must deregister all service instances that were registered using the service. For more information, see Deregistering an AWS Cloud Map service instance.

After deregistering all instances registered using the service, perform the following procedure to delete the service.

AWS Management Console
  1. Sign in to the AWS Management Console and open the AWS Cloud Map console at https://console.aws.amazon.com/cloudmap/.

  2. In the navigation pane, choose Namespaces.

  3. Choose the option for the namespace that contains the service that you want to delete.

  4. On the Namespace: namespace-name page, choose the option for the service that you want to delete.

  5. Choose Delete.

  6. Confirm that you want to delete the service.

AWS CLI
  • Delete a service with the delete-service command (replace the red value with your own).

    aws servicediscovery delete-service --id srv-xxxxxx
AWS 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. Delete a service with delete_service() (replace the red value with your own).

    response = client.delete_service( Id='srv-xxxxxx', ) # If you want to see the response print(response)

    Example response output

    { 'ResponseMetadata': { '...': '...', }, }
  1. Sign in to the AWS Management Console and open the AWS Cloud Map console at https://console.aws.amazon.com/cloudmap/.

  2. In the navigation pane, choose Namespaces.

  3. Choose the option for the namespace that contains the service that you want to delete.

  4. On the Namespace: namespace-name page, choose the option for the service that you want to delete.

  5. Choose Delete.

  6. Confirm that you want to delete the service.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.