SAA-C03 Question 330
Single answerA company is building a web application that handles both HTTP and HTTPS traffic for its users. They want to use an Application Load Balancer (ALB) to distribute incoming requests to multiple Amazon EC2 instances. The security team requires that all HTTP requests be redirected to HTTPS to ensure secure communication. How should the company configure the ALB to meet this requirement?
- A
Create an HTTPS listener and configure an SSL certificate. Add a rule to forward requests to the target group.
- B
Create an HTTP listener with a rule to redirect all traffic to HTTPS and create a separate HTTPS listener to handle HTTPS traffic.
- C
Create an HTTP listener and add a rule to forward requests to the HTTPS listener.
- D
Create two separate ALBs: one for HTTP traffic and one for HTTPS traffic.
Show answer and explanation
Correct answer: B
Explanation
An Application Load Balancer supports listeners for both HTTP and HTTPS protocols. To meet the requirement of redirecting HTTP traffic to HTTPS, the company should create an HTTP listener and configure a rule to redirect all HTTP requests to HTTPS. A separate HTTPS listener should be created to handle secure traffic. This approach ensures that all communication is encrypted without needing multiple ALBs or unnecessary complexity.
- A. Incorrect.
This option does not address the requirement to redirect HTTP traffic to HTTPS. It only handles HTTPS traffic properly.
- B. Correct.
This is the correct approach. The HTTP listener is configured with a rule to redirect all HTTP traffic to HTTPS, ensuring secure communication. Meanwhile, the HTTPS listener handles secure traffic.
- C. Incorrect.
This is not possible because an ALB cannot forward requests from one listener to another listener directly. Listeners forward traffic to target groups, not other listeners.
- D. Incorrect.
This is unnecessary and adds complexity. A single ALB can handle both HTTP and HTTPS traffic, as well as perform redirection rules.