Alarm on the AWS/Usage service quota metric for Fargate task count
Short answer
B Alarm on the AWS/Usage service quota metric with a metric/SERVICE_QUOTA expression above 80 percent and notify via SNS.
Question
Key Takeaways
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.
Common mistake: 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.
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
This link opens the official vendor documentation in a new tab.
Community Votes
100% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 4 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 4
-
kupo777 👍 5B https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Quotas-Visualize-Alarms.html
-
Chakanetsa 👍 3 Answered BWhy this is the correct choice: AWS/Usage metric namespace: This namespace provides detailed metrics for service usage and quotas, including the number of running ECS Fargate tasks. You can use this data to monitor how close you are to the service quotas. Service quota monitoring: The math expression metric/SERVICE_QUOTA(metric)*100 allows you to calculate the percentage of the quota being used, making it easy to set an alarm when usage reaches 80%. CloudWatch Alarm: This is a native and efficient way to monitor service usage, and you can easily configure notifications via Amazon SNS to alert the development team when the threshold is crossed.
-
Daniel76 👍 1 Answered BC and D are out due to using SES and not SNS for simple notification. Among A and B, A is out because CloudWatch alarm was set with SERVICE_QUOTA but the option choose to monitor sample count stats instead of service quota published.
-
c22ddd8 👍 2 Answered BService Quota
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All SAP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full SAP-C02 Practice Test →