AWS Certified Solutions Architect – Professional — Question 896

A company wants to deploy an API to AWS. The company plans to run the API on AWS Fargate behind a load balancer. The API requires the use of header- based routing and must be accessible from on-premises networks through an AWS Direct Connect connection and a private VIF.
The company needs to add the client IP addresses that connect to the API to an allow list in AWS. The company also needs to add the IP addresses of the API to the allow list. The company's security team will allow /27 CIDR ranges to be added to the allow list. The solution must minimize complexity and operational overhead.
Which solution will meet these requirements?

Answer options

Correct answer: B

Explanation

An Application Load Balancer (ALB) is required to support header-based routing, which rules out using only a Network Load Balancer (NLB). Because ALB IP addresses can change dynamically, deploying the ALB across dedicated /27 subnets allows the security team to easily allow-list the entire predictable /27 CIDR ranges without operational overhead. Option C is unnecessarily complex by chaining an NLB and an ALB, while Option D does not restrict the ALB to a specific /27 range.