SAP-C02 Question 658
Select 3A company is running microservices-based applications in Amazon ECS using Fargate as the launch type. The company has noticed an increase in costs and wants to implement a cost-optimization strategy. They also want to ensure that their applications remain highly available and scalable. Which actions should the solutions architect recommend?
- A
Enable ECS Task Auto Scaling to automatically adjust the number of running ECS tasks based on demand.
- B
Switch the ECS service deployment type to 'Blue/Green' to reduce costs by avoiding idle resources.
- C
Use Spot Fargate Tasks where appropriate for non-critical workloads to reduce compute costs.
- D
Migrate the workload from Fargate to Amazon EC2 instances to better control resource provisioning and optimize costs.
- E
Leverage ECS Service Scheduler with the 'REPLICA' scheduling strategy to maintain high availability.
Show answer and explanation
Correct answers: A, C, D
Explanation
To optimize costs in Amazon ECS with Fargate, several strategies can be implemented. Enabling ECS Task Auto Scaling ensures tasks scale based on demand, reducing unnecessary costs during low-demand periods while maintaining high availability. Using Spot Fargate Tasks for non-critical workloads leverages AWS's spare capacity at a reduced cost. Migrating to Amazon EC2 for predictable workloads allows for more granular control over resource utilization and can further optimize costs. These actions together help balance cost savings with scalability and availability.
- A. Correct.
Enabling ECS Task Auto Scaling allows the service to automatically scale the number of running ECS tasks based on demand, optimizing costs and ensuring high availability. This is a valid cost-optimization strategy.
- B. Incorrect.
Switching to a 'Blue/Green' deployment type is not directly related to cost optimization. It is primarily used for minimizing downtime and ensuring safer deployments.
- C. Correct.
Spot Fargate Tasks are a cost-saving option for non-critical workloads, as they take advantage of unused capacity at a lower cost. This is a valid cost-optimization strategy.
- D. Correct.
Migrating workloads from Fargate to Amazon EC2 can provide cost control through manual resource provisioning, especially for steady-state workloads. This is a viable cost-optimization strategy.
- E. Incorrect.
The 'REPLICA' scheduling strategy ensures high availability but does not directly contribute to cost optimization. It enables task distribution across multiple Availability Zones.