Skip to content

AWS ECS App mesh upgrade to Service connect , the service discovery not available in pure task batch job

0

As AWS App Mesh will be sunset in Sep2026, we are currently doing AWS ECS App mesh upgrade to ECS service connect, but we used to have app mesh registered with aws cloudmap with a hosted zone url for each ECS services, and it registered as serviceDiscovery in ECS service, now we change to AWS service connect, the url it generated can only be used in ECS service ,for those ECS task batch job(only task definition), it cannot call this service connect url.

Can we retain the service discovery url for each ECS service while it also configured with ECS service connect?

asked a month ago61 views

4 Answers
3
Accepted Answer

To address your follow-up question first: ECS Service Discovery is not being sunset. While App Mesh is retiring, Service Discovery is backed by AWS Cloud Map and Route 53 (core AWS services) and remains fully supported. You will absolutely still need it for clients operating outside the Service Connect proxy mesh, such as your standalone batch tasks.

Adding one crucial technical detail to the previous answer regarding running both configurations simultaneously: Because both traditional Service Discovery and Service Connect use AWS Cloud Map under the hood, they cannot register the exact same discovery name in the same namespace.

When adding the serviceConnectConfiguration to your existing ECS service, ensure you define a different clientAlias or discoveryName (for example, by adding a -sc suffix) than the one currently used in your serviceRegistries block. This prevents Cloud Map naming conflicts during deployment. Your batch tasks can then continue using the legacy DNS name, while your other ECS services communicate via the new Service Connect alias.

Reference on how Service Connect manages Cloud Map namespaces: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect-concepts.html

EXPERT

answered a month ago

EXPERT

reviewed a month ago

0

Yes, you can retain Service Discovery alongside Service Connect for your ECS services. These two features can coexist and serve different purposes in your architecture.

Service Connect and Service Discovery are independent features that can be configured simultaneously on the same ECS service. Service Connect creates its own AWS Cloud Map services automatically and provides DNS names that work within the Service Connect mesh (between tasks running with Service Connect enabled). However, this doesn't prevent you from also configuring traditional Service Discovery on your service.

For your use case with batch jobs that run as standalone tasks (without Service Connect enabled), you can maintain your existing Service Discovery configuration. This allows your batch job tasks to continue using the Service Discovery DNS names to reach your services, while your Service Connect-enabled services can communicate with each other using Service Connect's client aliases.

When configuring your services, you would:

  1. Keep your existing serviceRegistries configuration for Service Discovery
  2. Add the serviceConnectConfiguration for Service Connect functionality

This dual configuration approach allows you to support both your batch jobs (which use Service Discovery URLs) and your Service Connect-enabled services (which use Service Connect DNS names) during your migration period. The Service Discovery endpoints will continue to work as they did before, providing the hosted zone URLs your batch jobs depend on.

One important note: Service Connect automatically creates its own AWS Cloud Map services. You should avoid manually modifying these Service Connect-created Cloud Map resources, as doing so may lead to unexpected behavior. Keep your manually managed Service Discovery resources separate from the ones Service Connect creates automatically.
Sources
Amazon ECS Service Connect configuration overview - Amazon Elastic Container Service
ServiceConnectServiceResource (AWS SDK for Java - 2.42.38)
ServiceConnectServiceResource - Amazon Elastic Container Service

answered a month ago

EXPERT

reviewed a month ago

0

Enter image description here

answered a month ago

EXPERT

reviewed a month ago

0

Is this ECS Service - service discovery feature going to sunset like App Mesh ? as in the AWS ECS service discovery it recommends to use service connect , but service connect alone cannot satisfy our requirement (we need the url be able to used not only ECS service zone)

answered a month ago

EXPERT

reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.