SCS-C02 Infrastructure Security Practice Question
A company runs a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). The ALB is configured to terminate SSL/TLS and forward traffic to the instances over HTTP. The security team wants to ensure that the instances only accept traffic from the ALB, not from any other source. How can this be achieved?
⚠ Common exam trap
Test-takers frequently confuse security group referencing with IP-based rules, mistakenly thinking that using the ALB's subnet CIDR or VPC CIDR is sufficient, when in fact those approaches allow traffic from any resource in those ranges, not just the ALB.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Configure the instance security group to allow HTTP traffic only from the ALB's security group.
Referencing the ALB's security group in the instance security group rule allows traffic only from the ALB, regardless of the ALB's IP address changes. This leverages AWS security group referencing, which is a managed and scalable way to restrict traffic to a specific source security group. The ALB's security group acts as a logical identifier, ensuring that only traffic forwarded by the ALB reaches the instances.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Configure the instance security group to allow HTTP traffic only from the VPC CIDR block.
Why it's wrong here
Allowing HTTP from the entire VPC CIDR block means any resource with an IP address in that range can reach the instance on port 80, including compromised instances, Lambda in the VPC, NAT gateways, or other workloads. This is far broader than the intended source—the Application Load Balancer—and is not a valid way to restrict traffic to only the ALB. Instead, you should reference the ALB security group as the source so only the ALB's elastic network interfaces are authorized.
- ✓
Configure the instance security group to allow HTTP traffic only from the ALB's security group.
Why this is correct
Referencing the ALB's security group as the source in the instance security group rule limits inbound HTTP to traffic originating from the elastic network interfaces that actually belong to the ALB nodes. This SG-to-SG association follows the ALB as it scales or replaces its ENIs across Availability Zones, because any ENI that is a member of the ALB security group is automatically allowed. It is the recommended, least-privilege approach for placing an EC2 instance behind an Application Load Balancer.
- ✗
Configure the network ACL on the instance's subnet to allow HTTP traffic only from the ALB's private IP address.
Why it's wrong here
Network ACLs are stateless, so an inbound rule permitting HTTP from the ALB's private IP only controls the request direction; you must also add an outbound rule to allow the ephemeral response ports, otherwise replies are dropped. The NACL is associated with the whole subnet, so it would apply the same rule to every instance in that subnet, not just the target instance. Additionally, ALB private IPs can change when nodes scale, so pinning the rule to a specific IP is fragile compared to using a security group reference.
- ✗
Configure the instance security group to allow HTTP traffic only from the subnet CIDR block where the ALB resides.
Why it's wrong here
Using the ALB subnet's CIDR as the source authorizes every IP in that subnet, which includes not only the ALB nodes but also any other EC2 instances, containers, or services running in the same subnets, allowing them to bypass the load balancer entirely. If the ALB spans multiple subnets or Availability Zones, you would need to add rules for each subnet CIDR, and the rule still wouldn't update automatically when the ALB's membership changes. A security group reference is granular to the ALB itself and avoids these issues.
Go deeper
Related to this question
About these practice questions
Courseiva writes every SCS-C02 question from scratch — 376 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SCS-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SCS-C02 exam.