First, delete the AWS ECS service from the console, and if you have any service like namespace then delete them by using these commands:
aws servicediscovery list-services --region <region_name>
aws servicediscovery list-namespaces --region <region_name>
aws servicediscovery delete-namespace --id <service_discovery_namespace_id> --region <region_name>
For more, you can refer here.
Want to learn more about AWS, Come & join: AWS Training