How do I attach a security group to my Elastic Load Balancer?
Last updated: 2021-02-03
How do I configure and attach a security group to my Elastic Load Balancing (ELB) load balancer?
Note: If you receive errors when running AWS Command Line Interface (AWS CLI) commands, make sure that you’re using the most recent AWS CLI version.
If you're using an Application Load Balancer, follow the instructions at Security groups for your Application Load Balancer.
If you're using a Network Load Balancer, update the security groups for your target instances because Network Load Balancers don't have associated security groups.
- If your target type is an IP, add a rule to your security group to allow traffic from your load balancer's IP address to the target IP address.
- If your target type is an instance, add a rule to your security group to allow traffic from your load balancer's IP address and clients to the target IP address.
Note: Make sure that you associate at least one security group with each Classic or Application Load Balancer, and that the security group allows connections between the load balancer and associated backend instances.