Getting the Limit of AWS Accounts using BOTO3

二次信任 提交于 2019-12-18 09:44:44

问题


I need to monitor my infrastructure on AWS. For this, I am writing boto3 functions to know the limits of my account. However, I am not able to achieve the following things:

  1. Limit of EBS Volumes (Not able to find any method from where I can know the max number of Volumes I can create)
  2. Limit of total Number of Security Groups
  3. Limit of Security rules per Security group
  4. Max number of Elastic IPs. Since I have different AWS accounts and limits vary for each of these accounts. I need to take it dynamically from each account.

回答1:


It appears that Trusted Advisor has an API for providing limit checks. Also, specific services have API calls available to describe limits.

Take a look at awslimitchecker. It seems to provide a large number of limit checks. You could even look at the awslimitchecker code to see how it obtains the limits.




回答2:


Basically, AWS show you the VPC services limit here , but some soft limit can be lifted by emailing a request to AWS.

EBS soft limit is here.

If your real concern is the cost, then (eg.for those who host web page in AWS without CDN), you should create a billing alarm as describe here.




回答3:


We can achieve this by using trust advisor service. you only need to monitor the result by direct API call for Trust advisor like service limits in my case. https://console.aws.amazon.com/trustedadvisor/home?#/category/performance?checkId=eW7HH0l7J9



来源:https://stackoverflow.com/questions/43012889/getting-the-limit-of-aws-accounts-using-boto3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!