I use extensively EC2 instances for testing distributed system. Unfortunately, sometimes I hit the limit of running instances which cause the whole deployment to fail. I catch the appropriate exception, but I would prefer to avoid the whole deployment rather than failing after launching several instances. To avoid that kind of situation I would like to have a preflight check:
number_of_running_instances + number_of_required_instances <= instance_limit
I could easily check number_of_running_instances
and number_of_required_instances
, but I couldn't find an API for checking instance_limit
. Even worse, AWS support claims that there is no customer visible api for that:
https://forums.aws.amazon.com/message.jspa?messageID=296314
Moreover, I would prefer not to assume that the limit is default, because some of the AWS accounts at our company applied for higher limit.
Is there any workaround to solve that issue?
FYI, it is possible to query your AWS account limits, see: http://alestic.com/2013/12/ec2-account-attributes
You can use amazon describe-account-attributes to get the limits on the aws account.
"aws ec2 describe-account-attributes"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With