What should a solutions architect recommend?
Use Amazon EC2 Auto Scaling to scale at certain periods based on previous traffic patterns.
Use an AWS Lambda function to scale Amazon ECS based on metric breaches that trigger an Amazon CloudWatch alarm.
Use Amazon EC2 Auto Scaling with simple scaling policies to scale when ECS metric breaches trigger an Amazon CloudWatch alarm.
Use AWS Application Auto Scaling with target tracking policies to scale when ECS metric breaches trigger an Amazon CloudWatch alarm.
Explanations:
Amazon EC2 Auto Scaling is used for EC2 instances, not Fargate tasks. Fargate is serverless, so EC2 Auto Scaling is not applicable for scaling ECS tasks.
While Lambda can trigger scaling actions, it’s not the recommended approach for scaling ECS tasks. AWS services like Application Auto Scaling are more suited for this task.
EC2 Auto Scaling is not applicable to ECS with Fargate tasks, as they do not run on EC2 instances directly. It is meant for EC2-based instances.
AWS Application Auto Scaling with target tracking policies is designed for dynamically scaling ECS tasks based on CloudWatch metrics, which is ideal for Fargate deployments.