Hi, what is the reason of choosing a Network load balancer?. You are missing a service to make this solution viable. ALB is usually a more straightforward solution. However, here some remarks of using either NLB or ALB are that If you use an ALB then the API Gateway cannot be associated with an IP address or a security group, which means it is not possible to associate an API Gateway with an inbound rule. So ALB can not filter request by inbound rule. In addition, API Gateway's VPC link only supports NLB, which means API Gateway cannot specify ALB as forwarded target which is more suitable for an REST API integration. The solution, you must consume services through an API Gateway, VPC link, NLB and finally reach you container on ECS. Here an example of how to do it: https://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-with-private-integration.html
- For the health-checks configuration. Create an ECS Service. Choose Fargate launch type. When you configure network, make sure you use the VPC where your resources were deployed, choose your 2 private subnets, leave Auto-assign public IP enabled and use your NLB. Then, copy the tasks' private IP addresses (your subnets). Then go to Load Balancer Listeners, add the IP addresses to Network Load Balancer targets. Reminder: Service is for long running applications while task is ideal for short running jobs. Service can be configured to use a load balancer while task cannot.
Yes, this is done in the target group first, not in the load balancer. First, go to your target group, you need to update your target group, you must have chosen IP address as the target type, then in the targets tab click register target and here you add your IPs. After that, go to your NLB, in the Listeners tab click Edit listener and here you must select your target group. Or you can add a new listener as you prefer it or need it.
- asked 2 months ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 8 months ago
- EXPERTpublished 8 months ago
Can one add rules to the NLB after creating it? I have tried and there are no rule options on NLB the way ALB has so when I grab the Tasks IP addresses there is no way to add them