Which solution will meet these requirements?
Create an Auto Scaling group that contains multiple Amazon EC2 instances that host the application across two Availability Zones. Configure an Application Load Balancer (ALB) and set the Auto Scaling group as the target. Connect a WAF to the ALB.
Create a cluster placement group that contains multiple Amazon EC2 instances that hosts the application. Configure an Application Load Balancer and set the EC2 instances as the targets. Connect a WAF to the placement group.
Create two Amazon EC2 instances that host the application across two Availability Zones. Configure the EC2 instances as the targets of an Application Load Balancer (ALB). Connect a WAF to the ALB.
Create an Auto Scaling group that contains multiple Amazon EC2 instances that host the application across two Availability Zones. Configure an Application Load Balancer (ALB) and set the Auto Scaling group as the target. Connect a WAF to the Auto Scaling group.
Explanations:
This option uses an Auto Scaling group to manage multiple EC2 instances across two Availability Zones, enhancing availability. An Application Load Balancer (ALB) distributes traffic to these instances, ensuring fault tolerance. AWS WAF can be connected to the ALB to protect against web application attacks, fulfilling all the requirements for increased availability and security.
A cluster placement group is not suitable for this scenario as it focuses on high throughput for applications requiring low-latency communication between instances, rather than availability. It does not automatically scale or provide redundancy, making it less optimal for increasing availability. Additionally, connecting WAF to a placement group is not feasible; WAF is designed to work with ALBs or CloudFront distributions.
While this option sets up two EC2 instances across two Availability Zones and connects them to an ALB (which is good for availability), it lacks an Auto Scaling group. Without Auto Scaling, the solution does not provide the automatic scaling capability to handle traffic spikes or instance failures, which is crucial for maintaining high availability.
Although this option correctly utilizes an Auto Scaling group and ALB, connecting the WAF to the Auto Scaling group instead of the ALB is incorrect. WAF should be directly associated with the ALB to filter incoming traffic before it reaches the instances. This connection ensures that web traffic is monitored and protected effectively, which is not achieved by attaching WAF to the Auto Scaling group.