-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[aws-ecs] Allow associating an existing Cloud Map service to an ECS service #10057
[aws-ecs] Allow associating an existing Cloud Map service to an ECS service #10057
Comments
Fixing this would also enable use of apigatewayv2 with service discovery and ECS. At present it is not possible to pass the CloudMap service created by the ECS Service to an APIGateway HttpServiceDiscoveryIntegration. More detail at [aws-apigatewayv2-integrations] #11603. |
…h an ECS service (#13192) This PR introduces `BaseService.associateCloudMapService()` which allows the user to associate the ECS service with a CloudMap service that they provide. **API sample** ```ts const cloudMapService = new cloudmap.Service(...); const ecsService = new ecs.FargateService(...); ecsService.associateCloudMapService({ service: cloudMapService, }); ``` Closes #10057 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Customers who associate App Mesh Virtual Nodes with ECS services need to be able to properly configure service discovery. This entails the following steps:
Right now, if a customer creates an ECS service and calls enableCloudMap against it, a new Cloud Map service is created by CDK, even if the customer specifies the namespace and service names created in steps (1) and (2) above. Instead, the customer needs to refer to the existing Cloud Map service in order for everything to work properly.
Here's some example code that fails:
This results in a template with two instances of
AWS::ServiceDiscovery::Service
and a failure during stack creation caused by service duplication ("Service [srv-xxxxxxx] already exists").Proposed Solution
Need some method and/or construct property on ecs.{Ec2,Fargate}Service that allows passing in an existing Cloud Map service resource.
Current workaround:
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: