An application runs on three EC2 instances across three Availability Zones behind a Network Load Balancer (NLB). The administrator must restrict instance traffic so that only requests coming from the NLB are allowed. Which approach meets this requirement with the least operational work?
Choose an answer
Tap an option to check your answer.
Correct answer: Set the EC2 instances’ security group inbound rules to accept traffic only from the security group associated with the NLB..
Why this is the answer
The most operationally simple way to restrict traffic to EC2 instances from an NLB is by referencing the NLB's security group in the EC2 instances' security group inbound rules. This allows the instances to accept traffic only from the NLB, as security groups are stateful and manage traffic at the instance level. Referencing the NLB's security group is dynamic; it automatically adapts if the NLB's underlying IP addresses change. Referencing the NLB's elastic network interfaces is less practical because these IPs can change, requiring manual updates. Using network ACLs with CIDR ranges is also less dynamic and more complex to manage, as NLB IP addresses are not static. Deploying a third-party firewall adds significant operational overhead and cost, which goes against the "least operational work" requirement.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed