-
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
elbv2: Investigate NetworkLoadBalancer #4268
Comments
[Please note updated title and update at top] This is partly user error & partly the differences identified below are legitimate differences. However... I still think that there are some missing features so I will leave the list below to further the conversation. The fix for most of these features will be pulling the existing implementation out of the corresponding NetworkLoadBalancer
NetworkListener
NetworkTargetGroup
Again, I think the fix is going to pretty straight forward. In most cases it will be taking the current feature from the |
Update 3: This is partly user error 🙏 (60%) I've updated all of the existing comments with my latest knowledge, please take a gander at both and we can continue the conversation from there. |
Closing as a duplicate of #1490, please reopen if you think this has been closed in error. |
Removing comment in favor of #4319 |
We have the new issue, so closing this one again. |
Quick Update:
This is partly user error 🙏 (60%)
One of the core things I missed to begin with is that a
NetworkLoadBalancer
does not support Security Groups. Therefore they are fundamentally different fromApplicationLoadBalancer
s.However, there is still likely room to make the
NetworkLoadBalancer
a little more user friendly, specifically relating to the Security Group assigned to the instance.Recap:
We are dealing with a
NetworkLoadBalancer
, therefore all of the security policies are defined at the instance level (not the load balancer level) (subnets aside). To change the ingress policy for the instance we either need access to theSecurityGroup
of theAutoScalingGroup
or theAutoScalingGroup
itself (or add a newAutoScalingGroup
). With either of these we are able to make the necessary changes (either edit the existing or add a newSecurityGroup
) to enable access to the instances.Problem:
The problem is that when you get the
AutoScalingGroup
from the cluster (cluster.autoscalingGroup
), it returns a type ofIAutoScalingGroup
and not theAutoScalingGroup
type. TheIAutoScalingGroup
does not have any reference to the underlying security groups and you are not able to add a newSecurityGroup
.All of these facts taken together make it very difficult to work with ECS & NetworkLoadBalancers from CDK.
Original Post:
It looks like there are a number of missing features from the
NetworkLoadBalancer
. Specifically, there are no security groups created by default when using theNetworkLoadBalancedEc2Service
from theecs-patterns
package.Reproduction Steps
First deploy the stack:
Then look at the security groups associated with the EC2 instances. There are no ingress groups to allow traffic from the load balancer to the instance.
Error Log
N.A.
Environment
Other
Also given the issue described in #4267, I would expect to have this stack fail as well.
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: