Q49 — AWS SAA-C03 Ch.11
Question 49 of 100 | ← Chapter 11
Q749. A company runs a web application on Amazon EC2 instances in an Auto Scaling group that has a target group. The company designed the application to work with session affinity (sticky sessions) for a better user experience.The application must be available publicly over the internet as an endpoint. A WAF must be applied to the endpoint for additional security. Session affinity (sticky sessions) must be configured on the endpoint.Which combination of steps will meet these requirements? (Choose two.)
- A. Create a public Network Load Balancer. Specify the application target group.
- B. Create a Gateway Load Balancer. Specify the application target group.
- C. Create a public Application Load Balancer. Specify the application target group. ✓
- D. Create a second target group. Add Elastic IP addresses to the EC2 instances.
- E. Create a web ACL in AWS WAF. Associate the web ACL with the endpoint ✓
Correct Answer: C. Create a public Application Load Balancer. Specify the application target group., E. Create a web ACL in AWS WAF. Associate the web ACL with the endpoint
Explanation
To meet the requirements of making a web application publicly available with session affinity and applying a Web Application Firewall (WAF) for additional security, the following combination of steps should be taken:C. Create a public Application Load Balancer. Specify the application target group.E. Create a web ACL in AWS WAF. Associate the web ACL with the endpoint.Option C, creating a public Application Load Balancer (ALB) and specifying the application target group, is the appropriate choice for achieving the desired outcome. An ALB can distribute incoming traffic to multiple EC2 instances in an Auto Scaling group while supporting session affinity. By configuring the ALB with the target group, the load balancer can route requests to the instances while maintaining session affinity (sticky sessions) based on the chosen algorithm.Option E, creating a web ACL in AWS WAF and associating it with the endpoint, is necessary to enhance security by applying WAF protection to the web application. AWS WAF allows you to define rules and conditions to protect against common web attacks, such as SQL injection and cross-site scripting. By creating a web ACL and associating it with the ALB endpoint, the WAF can inspect incoming requests and take appropriate actions based on the defined rules.Option A, creating a public Network Load Balancer (NLB) and specifying the application target group, is not the best choice for this scenario. NLB does not support session affinity/sticky sessions by default. While it is possible to configure session affinity with NLB using additional settings, it would add complexity and may not provide the desired user experience.Option B, creating a Gateway Load Balancer (GWLB) and specifying the application target group, is not suitable for this scenario. GWLB is primarily used for handling network-level traffic and is not designed for HTTP/HTTPS traffic or application-level load balancing.Option D, creating a second target group and adding Elastic IP addresses to the EC2 instances, is not necessary for achieving session affinity or applying a WAF. It does not provide any direct solution to the requirements mentioned.Therefore, the two steps that will meet the requirements of making the web application publicly available with session affinity and applying a WAF are:C. Create a public Application Load Balancer. Specify the application target group.E. Create a web ACL in AWS WAF. Associate the web ACL with the endpoint.