Which solution will meet these requirements MOST cost-effectively?
Create an Auto Scaling group. Attach the Auto Scaling group to the target group of the NLB. Set the minimum capacity to 20 and the desired capacity to 28. Purchase Reserved Instances for 20 instances.
Create a Spot Fleet that has a request type of request. Set the TotalTargetCapacity parameter to 20. Set the DefaultTargetCapacityType parameter to On-Demand. Specify the NLB when creating the Spot Fleet.
Create a Spot Fleet that has a request type of maintain. Set the TotalTargetCapacity parameter to 20. Set the DefaultTargetCapacityType parameter to Spot. Replace the NLB with an Application Load Balancer.
Create an Auto Scaling group. Attach the Auto Scaling group to the target group of the NLB. Set the minimum capacity to 4 and the maximum capacity to 28. Purchase Reserved Instances for four instances.
Explanations:
Setting the minimum capacity to 20 and the desired capacity to 28 ensures that the Auto Scaling group is scaling up but doesn’t effectively address the problem during busy times. Purchasing Reserved Instances for 20 instances will not optimize costs, as the demand is not consistent across the entire 24/7 period.
Using a Spot Fleet with a request type of “request” is not suitable for this scenario. Spot instances are not guaranteed, and the demand for additional instances during busy times might cause interruptions, affecting application availability.
A Spot Fleet with “maintain” request type and Spot instances might work cost-effectively but can cause interruptions or availability issues due to the nature of Spot pricing and availability. Additionally, replacing the NLB with an Application Load Balancer is unnecessary for a stateless application.
An Auto Scaling group with a minimum of 4 instances and a maximum of 28 instances provides flexibility in scaling based on demand. This approach uses a mix of Auto Scaling for handling traffic spikes while minimizing costs with Reserved Instances for the baseline of 4 instances. This is the most cost-effective solution.