Alarm on the AWS/Usage service quota metric for Fargate task count
A company is running a large containerized workload in the AWS Cloud. The workload consists of approximately 100 different services. The company uses Amazon Elastic Container Service (Amazon ECS) to orchestrate the workload. Recently the company’s development team started using AWS Fargate instead of Amazon EC2 instances in the ECS cluster. In the past, the workload has come close to running the maximum number of EC2 instances that are available in the account. The company is worried that the workload could reach the maximum number of ECS tasks that are allowed. A solutions architect must implement a solution that will notify the development team when Fargate reaches 80% of the maximum number of tasks. What should the solutions architect do to meet this requirement?
Community Votes
100% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
Service quotas publish their current usage in the AWS/Usage metric namespace, so a metric math expression dividing that usage by the corresponding service quota and thresholding at eighty percent is the direct way to express the requirement.
A company runs about 100 services in an ECS cluster, recently moved from EC2 instances to Fargate, and previously came close to the account's maximum EC2 instance count. They now need notification when Fargate reaches eighty percent of the maximum number of tasks allowed.
Monitoring the Sample Count statistic per ECS service. Sample Count reflects the number of data points in a period rather than the account's consumed task quota, and combining it with SERVICE_QUOTA in a math expression does not compare usage against a quota, so the alarm would not fire on the intended condition.
Community Discussion (4 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
The requirement is a percentage of a service quota, and AWS publishes service quota usage in the AWS/Usage metric namespace. A CloudWatch alarm can be built on that metric with a math expression of metric divided by SERVICE_QUOTA for the same metric, multiplied by 100, and set to alarm when the result exceeds 80. That expression compares actual consumed Fargate task count against the account's maximum task quota and fires precisely at the required threshold, and Amazon SNS notifies the development team. No polling code is required, so nothing has to be maintained between the metric and the alarm.Why the Other Options Are Wrong
A: The Sample Count statistic reports how many data points exist for a statistic in a period, not how much of a service quota is consumed, so dividing it by SERVICE_QUOTA does not produce a utilisation percentage and the alarm would not represent the intended condition. C: A Lambda function that polls detailed metrics on a schedule is custom code to maintain, introduces polling delay, and uses Amazon SES for a notification that should be a simple topic-based alert, so it is the highest-effort answer with the wrong notification mechanism. D: AWS Config rules evaluate resource configuration compliance, not live service quota consumption, so a rule checking whether the Fargate SERVICE_QUOTA is above eighty percent is comparing the wrong values, since the quota itself is a static number rather than a measure of usage.Community Comment Notes
The community voted 100 to 0 for B, and the top-voted comment linked the CloudWatch documentation on visualizing and alarming on service quotas. Another explained the elimination of A precisely, that the alarm in A was set with SERVICE_QUOTA but the option chose to monitor the Sample Count statistic instead, so the expression does not measure utilisation. Commenters also noted that C and D use Amazon SES rather than SNS, which is the wrong choice for a simple developer notification.Official Reference
Related Analysis
Practice All SAP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full SAP-C02 Practice Test →