Which solution will meet these requirements in the MOST operationally efficient manner?
Create an AWS Lambda function that lists the EC2 instances, counts the EC2 instances, and compares the total number against the applied quota value by using the Service Quotas API. Configure the Lambda function to publish an Amazon Simple Notification Service (Amazon SNS) notification if the quota utilization is equal to or greater than 70%. Create an Amazon EventBridge rule to invoke the Lambda function.
Create an AWS Lambda function that lists the EC2 instances, counts the EC2 instances, and compares the total number against the applied quota value by using the Amazon CloudWatch Metrics API. Configure the Lambda function to publish an Amazon Simple Notification Service (Amazon SNS) notification if the quota utilization is equal to or greater than 70%. Create an Amazon EventBridge rule to invoke the Lambda function.
Use the Service Quotas console to create an Amazon CloudWatch alarm for the EC2 instances. Configure the alarm with quota utilization equal to or greater than 70%. Configure the alarm to publish an Amazon Simple Notification Service (Amazon SNS) notification when the alarm enters ALARM state.
Create an Amazon CloudWatch alarm. Configure the alarm with a threshold of 70% for the CPUUtilization metric for the EC2 instances. Configure the alarm to publish an Amazon Simple Notification Service (Amazon SNS) notification when the alarm enters ALARM state.
Explanations:
While this solution can track EC2 instances using the Service Quotas API, it requires a Lambda function and EventBridge to periodically check quotas, which adds complexity.
This approach uses the CloudWatch Metrics API instead of the Service Quotas API, which is not suitable for tracking EC2 instance service quotas.
The Service Quotas console directly supports creating CloudWatch alarms based on quota utilization, making this the most operationally efficient solution.
This solution monitors CPU utilization, not EC2 instance quotas. CPU load is unrelated to reaching the EC2 instance service quota.