-
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
ECS - ServiceConnect : There is no way to reference ServiceConnect Discovery URL which is needed to build APIGatewayv2 Integration #31215
Comments
Selecting service connect namespace is an option while adding API Gateway integration in AWS console. (Followed example https://github.com/aws-samples/ecs-service-connect-yelb-sample-app) |
@ashishdhingra , yes it is possible via console, see the screenshot attached in the feature description, but the main goal is to be able to accomplish the same via CDK. |
If not using CDK to provision ECS cluster, then it's possible to retrieve service using fromServiceAttributes:
However when creating from ECS construct, it's not exposing CloudMap configurations it has created hence unable to refer to them convinently. |
@MirandaDora serviceId: 'service_id', attribute is also not retrievable from cloudformation or CDK, so this has to be passed in manually to the template after the service is created in a prior step, is my understanding correct ? |
Describe the feature
Extend the CDK ability to build API Gateway Integration that references Service Connect, similar to the capability offered for Service Discovery, see the link: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigatewayv2_integrations-readme.html#cloud-map-service-discovery.
This is currently possible from the console, using the Private integration target that references the ServiceConnect CloudMap entry:
Which generates an integration with the below properties:
Use Case
Use CDK natively to build an integration between an ECS service that has service connect enabled and an API Gateway using private integration.
Proposed Solution
There are a number of options, but I was trying to get a reference for the ServiceConnect Discovery URI and pass that as a parameter the HttpIntegration method, but I wasn't able to do that.
The ServiceConnect discovery URL can be viewed as shown below:
The URL can be constructed using the pattern
serviceArn:'arn:aws:servicediscovery:<region-id:<aws_account_id>:service/<service_id>
which requires a reference to the CloudMap service ID.Other Information
No response
Acknowledgements
CDK version used
2.148.0 (build e5740c0)
Environment details (OS name and version, etc.)
Microsoft Windows 11 Enterprise - 23H2
The text was updated successfully, but these errors were encountered: