[ecs-patterns] ApplicationLoadBalancedFargateService - how to add security group to Network Interface #8953
Labels
@aws-cdk/aws-ecs-patterns
Related to ecs-patterns library
guidance
Question that needs advice or information.
in-progress
This issue is being actively worked on.
needs-triage
This issue or PR still needs to be triaged.
Hi,
I am trying to create a Fargate ECS cluster with two Tasks. I want each Task to communicate over tcp to non-default ports. I am using the ApplicationLoadBalancedFargateService in C#, but I cannot see where to add a Security Group that allows inbound traffic to these ports. I can add one in the console after the stack has been deployed, but I want to include it in the CDK stack. I can see that the following group is successfully created:
but it does not get added to the ENI of the ECS Service. I have tried adding the group to the Service created as part of using
ApplicationLoadBalancedFargateService
via theConnections.AddSecurityGroup
method.How can I get the security group to be used for the ENIs created for the tasks?
Many thanks
The text was updated successfully, but these errors were encountered: