1 Answer
- Newest
- Most votes
- Most comments
1
Hi,
There are different services integrated with service connect, ECS, Route53, CloudMap.
Create a cluster associated to a Service connect namespace:
aws ecs create-cluster --cluster svc-cluster --service-connect-defaults '{ "namespace": "svc-namespace" }'
You can list services in CloudMap Service discovery:
aws servicediscovery --region $AWS_REGION get-namespace --id svc-namespace
You can create a service that expose on the service connect namespace
aws ecs create-service \
--cluster svc-cluster \
--service-name "nodejs" \
--desired-count 1 \
--task-definition "ecsdemo-nodejs" \
--service-connect-configuration '{
"enabled": true,
"namespace": "svc-namespace",
"services":
[
{
"portName": "nodejs-port",
"clientAliases": [
{
"port": 3000,
"dnsName": "nodejs"
}
]
}
],
}' \
--launch-type FARGATE \
--deployment-configuration "deploymentCircuitBreaker={enable=true,rollback=true}" \
--network-configuration "awsvpcConfiguration={subnets=[subnet-123456,subnet-123456],securityGroups=[sg-123456],assignPublicIp="DISABLED"}" \
--enable-execute-command
To check the connectivity between services, you can ecs exec in a task and connect to it's service connect discovery name.
In the case of the exposed service previous it is reachable on curl http://nodejs:3000
answered a year ago
Relevant content
- asked 2 years ago
- asked 2 years ago
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 2 years ago
Thank you very much