How can I allow the tasks in my Amazon ECS services to communicate with each other?

Lesedauer: 2 Minute
0

I want to allow the tasks in my Amazon Elastic Container Service (Amazon ECS) services to communicate with each other.

Short description

You can allow your tasks to communicate with each other using Service discovery. Service discovery helps manage HTTP and DNS namespaces for your Amazon ECS services.

Note: Service discovery supports the A and SRV DNS record types. DNS records are automatically added or removed as tasks start or stop in the Amazon ECS service. Tasks or applications that need to connect to your Amazon ECS service can locate an existing task from the DNS record.

Resolution

Important: You can't update an existing service to use service discovery, or modify the service discovery configuration once your service is created. You can only configure service discovery when you create a new service.

Before you get started with service discovery, see Service discovery and review Service discovery considerations.

Configure service discovery using either the Amazon ECS console or the AWS Command Line Interface (AWS CLI).

Important: After you have configured service discovery, use the YourServiceDiscoveryServiceName.YourServiceDiscoveryNamespace format to query DNS records for a service discovery service within your Amazon Virtual Private Cloud (Amazon VPC).


AWS OFFICIAL
AWS OFFICIALAktualisiert vor 4 Jahren
2 Kommentare

"Important: After you have configured service discovery, use the YourServiceDiscoveryServiceName.YourServiceDiscoveryNamespace format to query DNS records for a service discovery service within your Amazon Virtual Private Cloud (Amazon VPC)." - this doesn't seem to work and gives connection refused error.

Adit
beantwortet vor 2 Monaten

Thank you for your comment. We'll review and update the Knowledge Center article as needed.

profile pictureAWS
MODERATOR
beantwortet vor 2 Monaten