Accompany wants to monitor the number of Amazon EC2 instances that it is running. The company also wants to automate a service quota increase when the number of instances reaches a specific threshold.
Which solution meets these requirements?
A.
Create an Amazon CloudWatch alarm to monitor Service Quotas. Configure the alarm to invoke an AWS Lambda function to request a quota increase when the alarm reaches the threshold.
B.
Create an AWS Config rule to monitor Service Quotas. Call an AWS Lambda function to remediate the action and increase the quota.
C.
Create an Amazon CloudWateh alarm to monitor the AWS Health Dashboard. Configure the alarm to invoke an AWS Lambda function to request a quota increase when the alarm reaches the threshold.
D.
Create an Amazon CloudWatch alarm to monitor AWS Trusted Advisor service quotas. Configure the alarm to publish a message to an Amazon Simple Notification Service (Amazon SNS) topic to increase the quota.
SNS cannot request a service limit increase, however CloudWatch can trigger an AWS Lambda function to automatically request a quota increase.
here is an example:
https://www.youtube.com/watch?v=3WUShZ4lZGE
Option A leverages Amazon CloudWatch alarms to monitor the Service Quotas metric related to the number of EC2 instances. When the alarm's threshold is breached, it triggers an action to invoke an AWS Lambda function. This Lambda function can be programmed to automatically request a quota increase for the EC2 instances, based on the predetermined conditions set in the alarm.
I got doubt between A and D. For my knowledge SNS cannot do data manipulation, to ask a quota increase we need to specify a desired value, I can easy the desired value to be easily calculate with lambda, while i don't understand how to do it with SNS.So i will go for A, but open to change my mind
Both A and D work. I am not sure if they are going for the most simple solution (d). They normally specify when they want the most operational effective way. Play safe, D is correct and its the most simple way
For my knowledge SNS cannot do data manipulation. To ask a quota increase we need to specify a desired value, I can easy the desired value to be easily calculate with lambda, while i don't understand how to do it with SNS.So i will go for A, but open to change my mind
To monitor the number of Amazon EC2 instances and automate a service quota increase when a specific threshold is reached, you can use Amazon CloudWatch alarms and AWS Lambda functions.
Monitoring AWS Trusted Advisor service quotas is not the correct method for monitoring the number of EC2 instances or automating quota increases.
CloudWatch is OK to monitor Service Quotas and Trusted Advisor forwards quota issues to CloudWatch. IMHO, the question centers around the best way to initiate a Quota Increase. I think it could be done with Lambda (aws cli). However, I think it's cleaner to just use SNS to publish the quota increase request directly to HTTPS endpoint (AWS API Call). Don't need Lambda (IMHO)
Based on my research
- I do know that Trusted Advisor forwards service quota issues to CloudWatch
- I don't know if Trusted Advisor (on a schedule?)
- I do not know if CloudWatch monitors Service Quota's directely (independend of Trusted Advisor)
- I think best solution is for SNS to call RequestServiceQuotaIncrease API directly (don't need Lambda)
Here's some CLI examples I came up with for EC2 "New Reserved Instances per month" quota
aws service-quotas get-aws-default-service-quota --service-code ec2 --quota-code L-D0B7243C
aws service-quotas list-service-quotas --service-code ec2 --query "Quotas[?QuotaName=='New Reserved Instances per month']"
aws service-quotas request-service-quota-increase --service-code ec2 --quota-code L-D0B7243C --desired-value 21
aws service-quotas get-requested-service-quota-change --request-id 0f06391f1678494bad04e24d91c88fb8OF5J35Qu
URLs
https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html
https://docs.aws.amazon.com/servicequotas/2019-06-24/apireference/API_RequestServiceQuotaIncrease.html
For my knowledge SNS cannot do data manipulation, to ask a quota increase we need to specify a desired value, I can easy the desired value to be easily calculate with lambda, while i don't understand how to do it with SNS.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
cerepx
Highly Voted 1 year agoctd983
Highly Voted 1 year, 3 months agoStudent013657
Most Recent 4 months, 3 weeks agoMarch2023
7 months, 2 weeks agocallspace
1 year agoxile1021
1 year agoTwinSpark
1 year agowh1t4k3r
1 year, 1 month agoTwinSpark
1 year agotdunna
1 year, 1 month agoDebugs_Bunny
10 months, 3 weeks ago[Removed]
1 year, 3 months agojlmadvig
1 year, 3 months agojosemajc
1 year, 4 months agoGomer
1 year, 4 months agoGomer
1 year, 4 months agoGomer
1 year, 4 months agoTwinSpark
1 year ago