What should the solutions architect do to meet this requirement?
Use Amazon CloudWatch to monitor the Sample Count statistic for each service in the ECS cluster. Set an alarm for when the math expression sample count/ SERVICE_QUOTA(service)*100 is greater than 80. Notify the development team by using Amazon Simple Notification Service (Amazon SNS).
Use Amazon CloudWatch to monitor service quotas that are published under the AWS/Usage metric namespace. Set an alarm for when the math expression metric/SERVICE_QUOTA(metric)*100 is greater than 80. Notify the development team by using Amazon Simple Notification Service (Amazon SNS).
Create an AWS Lambda function to poll detailed metrics form the ECS cluster. When the number of running Fargate tasks is greater than 80, invoke Amazon Simple Email Service (Amazon SES) to notify the development team.
Create an AWS Config rule to evaluate whether the Fargate SERVICE_QUOTA is greater than 80. Use Amazon Simple Email Service (Amazon SES) to notify the development team when the AWS Config rule is not compliant.
Explanations:
This option monitors the Sample Count statistic for each service rather than the overall maximum number of tasks. The metric does not directly relate to the Fargate task limit, making it ineffective for notifying when the task count approaches the limit.
This option correctly utilizes Amazon CloudWatch to monitor service quotas published under the AWS/Usage namespace. By setting an alarm based on the service quota and the number of tasks running, it effectively provides a notification when the limit is approached, which meets the requirement.
Although this option proposes using AWS Lambda to poll metrics, it incorrectly checks if the number of running tasks is greater than 80 instead of checking against the maximum service quota. Additionally, it uses Amazon SES for notifications instead of the preferred Amazon SNS.
This option relies on an AWS Config rule to evaluate the service quota, which is not an appropriate use case. AWS Config is primarily used for compliance and resource configurations, not for monitoring real-time usage metrics like the number of running Fargate tasks.