jantman / awslimitchecker

A script and python package to check your AWS service limits and usage via boto3.
http://awslimitchecker.readthedocs.org/
GNU Affero General Public License v3.0
514 stars 188 forks source link

EC2 Service doesn't work #572

Closed AddisonG closed 2 years ago

AddisonG commented 2 years ago

Bug Report

Running awslimitchecker --service EC2 or anything similar gives no useful output, and instead throws warnings.

Version

awslimitchecker 12.0.0

Installation Method

Installed using pip. No virtualenv.

Supporting Software Versions

Python 3.8.10 Ubuntu 20.04

Actual Output

/usr/lib/python3/dist-packages/secretstorage/dhcrypto.py:15: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
/usr/lib/python3/dist-packages/secretstorage/util.py:19: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
awslimitchecker 12.0.0 is AGPL-licensed free software; all users have a right to the full source code of this version. See <https://github.com/jantman/awslimitchecker>
2022-04-29 15:46:52,765 [DEBUG connectionpool.py:1001 - urllib3.connectionpool._new_conn() ] Starting new HTTPS connection (1): pypi.org:443
2022-04-29 15:46:52,780 [DEBUG connectionpool.py:456 - urllib3.connectionpool._make_request() ] https://pypi.org:443 "GET /pypi/awslimitchecker/json HTTP/1.1" 200 72860
2022-04-29 15:46:52,784 [DEBUG checker.py:285 - awslimitchecker.checker._boto_conn_kwargs() ] Connecting to region None
2022-04-29 15:46:52,784 [DEBUG cloudtrail.py:125 - awslimitchecker.services.cloudtrail.get_limits() ] Gathering CloudTrail's limits from AWS
2022-04-29 15:46:52,829 [INFO connectable.py:123 - awslimitchecker.connectable.connect() ] Connected to dynamodb in region ap-southeast-2
2022-04-29 15:46:52,862 [INFO connectable.py:123 - awslimitchecker.connectable.connect() ] Connected to ec2 in region ap-southeast-2
2022-04-29 15:46:52,865 [INFO connectable.py:123 - awslimitchecker.connectable.connect() ] Connected to kinesis in region ap-southeast-2
2022-04-29 15:46:52,866 [DEBUG lambdafunc.py:84 - awslimitchecker.services.lambdafunc.get_limits() ] Getting limits for Lambda
2022-04-29 15:46:52,867 [DEBUG cloudtrail.py:125 - awslimitchecker.services.cloudtrail.get_limits() ] Gathering CloudTrail's limits from AWS
2022-04-29 15:46:52,867 [DEBUG lambdafunc.py:84 - awslimitchecker.services.lambdafunc.get_limits() ] Getting limits for Lambda
2022-04-29 15:46:52,869 [INFO connectable.py:123 - awslimitchecker.connectable.connect() ] Connected to support in region us-east-1
2022-04-29 15:46:52,869 [INFO trustedadvisor.py:147 - awslimitchecker.trustedadvisor.update_limits() ] Not using Trusted Advisor in regions outside of China or GovCloud; export FORCE_USE_TA=true to override.
2022-04-29 15:46:52,874 [INFO connectable.py:123 - awslimitchecker.connectable.connect() ] Connected to ec2 in region ap-southeast-2
2022-04-29 15:46:52,886 [INFO connectable.py:148 - awslimitchecker.connectable.connect_resource() ] Connected to ec2 (resource) in region ap-southeast-2
2022-04-29 15:46:52,886 [INFO ec2.py:445 - awslimitchecker.services.ec2._update_limits_from_api() ] Querying EC2 DescribeAccountAttributes for limits
2022-04-29 15:46:52,887 [DEBUG connectionpool.py:1001 - urllib3.connectionpool._new_conn() ] Starting new HTTPS connection (1): ec2.ap-southeast-2.amazonaws.com:443
2022-04-29 15:46:52,984 [DEBUG connectionpool.py:456 - urllib3.connectionpool._make_request() ] https://ec2.ap-southeast-2.amazonaws.com:443 "POST / HTTP/1.1" 200 1858
2022-04-29 15:46:52,988 [DEBUG ec2.py:464 - awslimitchecker.services.ec2._update_limits_from_api() ] Done setting limits from API
2022-04-29 15:46:52,988 [DEBUG base.py:296 - awslimitchecker.services.base._update_service_quotas() ] Updating service quotas for EC2
2022-04-29 15:46:53,004 [INFO connectable.py:123 - awslimitchecker.connectable.connect() ] Connected to service-quotas in region ap-southeast-2
2022-04-29 15:46:53,004 [DEBUG quotas.py:79 - awslimitchecker.quotas.quotas_for_service() ] Getting service quotas for service code: ec2
2022-04-29 15:46:53,019 [DEBUG connectionpool.py:1001 - urllib3.connectionpool._new_conn() ] Starting new HTTPS connection (1): servicequotas.ap-southeast-2.amazonaws.com:443
2022-04-29 15:46:53,251 [DEBUG connectionpool.py:456 - urllib3.connectionpool._make_request() ] https://servicequotas.ap-southeast-2.amazonaws.com:443 "POST / HTTP/1.1" 200 8739
2022-04-29 15:46:53,380 [DEBUG connectionpool.py:456 - urllib3.connectionpool._make_request() ] https://servicequotas.ap-southeast-2.amazonaws.com:443 "POST / HTTP/1.1" 200 7101
2022-04-29 15:46:53,504 [DEBUG connectionpool.py:456 - urllib3.connectionpool._make_request() ] https://servicequotas.ap-southeast-2.amazonaws.com:443 "POST / HTTP/1.1" 200 7112
2022-04-29 15:46:53,715 [DEBUG connectionpool.py:456 - urllib3.connectionpool._make_request() ] https://servicequotas.ap-southeast-2.amazonaws.com:443 "POST / HTTP/1.1" 200 8892
2022-04-29 15:46:53,848 [DEBUG connectionpool.py:456 - urllib3.connectionpool._make_request() ] https://servicequotas.ap-southeast-2.amazonaws.com:443 "POST / HTTP/1.1" 200 309
2022-04-29 15:46:53,848 [DEBUG quotas.py:108 - awslimitchecker.quotas.quotas_for_service() ] Retrieved 81 quotas for service code ec2: ['All DL Spot Instance Requests', 'All F Spot Instance Requests', 'All G and VT Spot Instance Requests', 'All Inf Spot Instance Requests', 'All P Spot Instance Requests', 'All Standard (A, C, D, H, I, M, R, T, Z) Spot Instance Requests', 'All X Spot Instance Requests', 'Attachments per VPC', 'Attachments per transit gateway', 'Authorization rules per Client VPN endpoint', 'Client VPN endpoints per Region', 'Concurrent client connections per Client VPN endpoint', 'Customer gateways per region', 'EC2-Classic Elastic IPs', 'EC2-VPC Elastic IPs', 'New Reserved Instances per month', 'Peering attachments per transit gateway', 'Pending peering attachments per transit gateway', 'Routes per Client VPN endpoint', 'Routes per transit gateway', 'Running Dedicated a1 Hosts', 'Running Dedicated c3 Hosts', 'Running Dedicated c4 Hosts', 'Running Dedicated c5 Hosts', 'Running Dedicated c5a Hosts', 'Running Dedicated c5d Hosts', 'Running Dedicated c5n Hosts', 'Running Dedicated c6g Hosts', 'Running Dedicated c6gd Hosts', 'Running Dedicated c6gn Hosts', 'Running Dedicated c6i Hosts', 'Running Dedicated d2 Hosts', 'Running Dedicated f1 Hosts', 'Running Dedicated g2 Hosts', 'Running Dedicated g3 Hosts', 'Running Dedicated g3s Hosts', 'Running Dedicated g4dn Hosts', 'Running Dedicated i2 Hosts', 'Running Dedicated i3 Hosts', 'Running Dedicated i3en Hosts', 'Running Dedicated inf Hosts', 'Running Dedicated m3 Hosts', 'Running Dedicated m4 Hosts', 'Running Dedicated m5 Hosts', 'Running Dedicated m5a Hosts', 'Running Dedicated m5ad Hosts', 'Running Dedicated m5d Hosts', 'Running Dedicated m6g Hosts', 'Running Dedicated m6gd Hosts', 'Running Dedicated m6i Hosts', 'Running Dedicated mac1 Hosts', 'Running Dedicated p2 Hosts', 'Running Dedicated p3 Hosts', 'Running Dedicated r3 Hosts', 'Running Dedicated r4 Hosts', 'Running Dedicated r5 Hosts', 'Running Dedicated r5a Hosts', 'Running Dedicated r5ad Hosts', 'Running Dedicated r5d Hosts', 'Running Dedicated r5dn Hosts', 'Running Dedicated r5n Hosts', 'Running Dedicated r6g Hosts', 'Running Dedicated r6gd Hosts', 'Running Dedicated r6i Hosts', 'Running Dedicated t3 Hosts', 'Running Dedicated u-6tb1 Hosts', 'Running Dedicated x1 Hosts', 'Running Dedicated x1e Hosts', 'Running Dedicated z1d Hosts', 'Running On-Demand DL instances', 'Running On-Demand F instances', 'Running On-Demand G and VT instances', 'Running On-Demand High Memory instances', 'Running On-Demand Inf instances', 'Running On-Demand P instances', 'Running On-Demand Standard (A, C, D, H, I, M, R, T, Z) instances', 'Running On-Demand X instances', 'Transit gateways per account', 'VPN connections per VGW', 'VPN connections per region', 'Virtual private gateways per region']
2022-04-29 15:46:53,849 [DEBUG quotas.py:79 - awslimitchecker.quotas.quotas_for_service() ] Getting service quotas for service code: vpc
2022-04-29 15:46:54,048 [DEBUG connectionpool.py:456 - urllib3.connectionpool._make_request() ] https://servicequotas.ap-southeast-2.amazonaws.com:443 "POST / HTTP/1.1" 200 7224
2022-04-29 15:46:54,184 [DEBUG connectionpool.py:456 - urllib3.connectionpool._make_request() ] https://servicequotas.ap-southeast-2.amazonaws.com:443 "POST / HTTP/1.1" 200 290
2022-04-29 15:46:54,186 [DEBUG quotas.py:108 - awslimitchecker.quotas.quotas_for_service() ] Retrieved 21 quotas for service code vpc: ['Active VPC peering connections per VPC', 'Egress-only internet gateways per Region', 'Gateway VPC endpoints per Region', 'IPv4 CIDR blocks per VPC', 'Inbound or outbound rules per security group', 'Interface VPC endpoints per VPC', 'Internet gateways per Region', 'NAT gateways per Availability Zone', 'Network ACLs per VPC', 'Network interfaces per Region', 'Outstanding VPC peering connection requests', 'Participant accounts per VPC', 'Route tables per VPC', 'Routes per route table', 'Rules per network ACL', 'Security groups per network interface', 'Subnets per VPC', 'Subnets that can be shared with an account', 'VPC peering connection request expiry hours', 'VPC security groups per Region', 'VPCs per Region']
2022-04-29 15:46:54,186 [DEBUG ec2.py:123 - awslimitchecker.services.ec2.find_usage() ] Checking usage for service EC2
2022-04-29 15:46:54,186 [DEBUG ec2.py:282 - awslimitchecker.services.ec2._get_reserved_instance_count() ] Getting reserved instance information
2022-04-29 15:46:54,239 [DEBUG connectionpool.py:456 - urllib3.connectionpool._make_request() ] https://ec2.ap-southeast-2.amazonaws.com:443 "POST / HTTP/1.1" 200 252
2022-04-29 15:46:54,241 [DEBUG ec2.py:193 - awslimitchecker.services.ec2._find_usage_instances_vcpu() ] Reserved instance count: {}
2022-04-29 15:46:54,242 [DEBUG ec2.py:355 - awslimitchecker.services.ec2._instance_usage_vcpu() ] Getting usage for on-demand instances (vCPU limit)
2022-04-29 15:46:54,248 [DEBUG connectionpool.py:1001 - urllib3.connectionpool._new_conn() ] Starting new HTTPS connection (1): ec2.ap-southeast-2.amazonaws.com:443
2022-04-29 15:46:55,012 [DEBUG connectionpool.py:456 - urllib3.connectionpool._make_request() ] https://ec2.ap-southeast-2.amazonaws.com:443 "POST / HTTP/1.1" 200 None
2022-04-29 15:46:55,194 [DEBUG ec2.py:368 - awslimitchecker.services.ec2._instance_usage_vcpu() ] Ignoring instance i-000redacted000 in state stopped
2022-04-29 15:46:55,195 [DEBUG ec2.py:368 - awslimitchecker.services.ec2._instance_usage_vcpu() ] Ignoring instance i-000redacted000 in state stopped
2022-04-29 15:46:55,195 [INFO ec2.py:358 - awslimitchecker.services.ec2._instance_usage_vcpu() ] Spot instance found (i-000redacted000); skipping from Running On-Demand Instances count
2022-04-29 15:46:55,195 [INFO ec2.py:358 - awslimitchecker.services.ec2._instance_usage_vcpu() ] Spot instance found (i-000redacted000); skipping from Running On-Demand Instances count
2022-04-29 15:46:55,195 [INFO ec2.py:358 - awslimitchecker.services.ec2._instance_usage_vcpu() ] Spot instance found (i-000redacted000); skipping from Running On-Demand Instances count
2022-04-29 15:46:55,195 [DEBUG ec2.py:368 - awslimitchecker.services.ec2._instance_usage_vcpu() ] Ignoring instance i-000redacted000 in state terminated
2022-04-29 15:46:55,195 [INFO ec2.py:358 - awslimitchecker.services.ec2._instance_usage_vcpu() ] Spot instance found (i-000redacted000); skipping from Running On-Demand Instances count
2022-04-29 15:46:55,195 [INFO ec2.py:358 - awslimitchecker.services.ec2._instance_usage_vcpu() ] Spot instance found (i-000redacted000); skipping from Running On-Demand Instances count
2022-04-29 15:46:55,196 [DEBUG ec2.py:690 - awslimitchecker.services.ec2._find_usage_networking_sgs() ] Getting usage for EC2 VPC resources
2022-04-29 15:46:55,198 [INFO base.py:111 - awslimitchecker.services.base.current_account_id() ] Connected to STS in region ap-southeast-2
2022-04-29 15:46:55,199 [DEBUG connectionpool.py:1001 - urllib3.connectionpool._new_conn() ] Starting new HTTPS connection (1): sts.amazonaws.com:443
2022-04-29 15:46:56,217 [DEBUG connectionpool.py:456 - urllib3.connectionpool._make_request() ] https://sts.amazonaws.com:443 "POST / HTTP/1.1" 200 405
2022-04-29 15:46:56,351 [DEBUG connectionpool.py:456 - urllib3.connectionpool._make_request() ] https://ec2.ap-southeast-2.amazonaws.com:443 "POST / HTTP/1.1" 200 None
2022-04-29 15:46:56,422 [DEBUG ec2.py:741 - awslimitchecker.services.ec2._find_usage_networking_eips() ] Getting usage for EC2 EIPs
2022-04-29 15:46:56,477 [DEBUG connectionpool.py:456 - urllib3.connectionpool._make_request() ] https://ec2.ap-southeast-2.amazonaws.com:443 "POST / HTTP/1.1" 200 5434
2022-04-29 15:46:56,538 [DEBUG connectionpool.py:456 - urllib3.connectionpool._make_request() ] https://ec2.ap-southeast-2.amazonaws.com:443 "POST / HTTP/1.1" 200 228
2022-04-29 15:46:56,542 [DEBUG ec2.py:756 - awslimitchecker.services.ec2._find_usage_networking_eni_sg() ] Getting usage for EC2 Network Interfaces
2022-04-29 15:46:56,810 [DEBUG connectionpool.py:456 - urllib3.connectionpool._make_request() ] https://ec2.ap-southeast-2.amazonaws.com:443 "POST / HTTP/1.1" 200 None
2022-04-29 15:46:56,917 [DEBUG ec2.py:214 - awslimitchecker.services.ec2._find_usage_spot_instances() ] Getting spot instance request usage
2022-04-29 15:46:56,921 [INFO base.py:317 - awslimitchecker.services.base._cloudwatch_connection() ] Connected to cloudwatch in region ap-southeast-2
2022-04-29 15:46:56,921 [DEBUG base.py:362 - awslimitchecker.services.base._get_cloudwatch_usage_latest() ] Querying CloudWatch GetMetricData: {'MetricDataQueries': [{'Id': 'id', 'MetricStat': {'Metric': {'Namespace': 'AWS/Usage', 'MetricName': 'ResourceCount', 'Dimensions': [{'Name': 'Type', 'Value': 'Resource'}, {'Name': 'Resource', 'Value': 'vCPU'}, {'Name': 'Service', 'Value': 'EC2'}, {'Name': 'Class', 'Value': 'F/Spot'}]}, 'Period': 300, 'Stat': 'Average'}}], 'StartTime': datetime.datetime(2022, 4, 29, 4, 45, 56, 921127), 'EndTime': datetime.datetime(2022, 4, 29, 5, 45, 56, 921132), 'ScanBy': 'TimestampDescending', 'MaxDatapoints': 1}
2022-04-29 15:46:56,922 [DEBUG connectionpool.py:1001 - urllib3.connectionpool._new_conn() ] Starting new HTTPS connection (1): monitoring.ap-southeast-2.amazonaws.com:443
2022-04-29 15:46:57,019 [DEBUG connectionpool.py:456 - urllib3.connectionpool._make_request() ] https://monitoring.ap-southeast-2.amazonaws.com:443 "POST / HTTP/1.1" 200 679
2022-04-29 15:46:57,022 [WARNING base.py:372 - awslimitchecker.services.base._get_cloudwatch_usage_latest() ] No data points found for AWS/Usage metric ResourceCount with dimensions [{'Name': 'Type', 'Value': 'Resource'}, {'Name': 'Resource', 'Value': 'vCPU'}, {'Name': 'Service', 'Value': 'EC2'}, {'Name': 'Class', 'Value': 'F/Spot'}]; using value of zero!
2022-04-29 15:46:57,022 [DEBUG base.py:362 - awslimitchecker.services.base._get_cloudwatch_usage_latest() ] Querying CloudWatch GetMetricData: {'MetricDataQueries': [{'Id': 'id', 'MetricStat': {'Metric': {'Namespace': 'AWS/Usage', 'MetricName': 'ResourceCount', 'Dimensions': [{'Name': 'Type', 'Value': 'Resource'}, {'Name': 'Resource', 'Value': 'vCPU'}, {'Name': 'Service', 'Value': 'EC2'}, {'Name': 'Class', 'Value': 'G/Spot'}]}, 'Period': 300, 'Stat': 'Average'}}], 'StartTime': datetime.datetime(2022, 4, 29, 4, 45, 57, 22311), 'EndTime': datetime.datetime(2022, 4, 29, 5, 45, 57, 22331), 'ScanBy': 'TimestampDescending', 'MaxDatapoints': 1}
2022-04-29 15:46:57,061 [DEBUG connectionpool.py:456 - urllib3.connectionpool._make_request() ] https://monitoring.ap-southeast-2.amazonaws.com:443 "POST / HTTP/1.1" 200 679
2022-04-29 15:46:57,063 [WARNING base.py:372 - awslimitchecker.services.base._get_cloudwatch_usage_latest() ] No data points found for AWS/Usage metric ResourceCount with dimensions [{'Name': 'Type', 'Value': 'Resource'}, {'Name': 'Resource', 'Value': 'vCPU'}, {'Name': 'Service', 'Value': 'EC2'}, {'Name': 'Class', 'Value': 'G/Spot'}]; using value of zero!
2022-04-29 15:46:57,063 [DEBUG base.py:362 - awslimitchecker.services.base._get_cloudwatch_usage_latest() ] Querying CloudWatch GetMetricData: {'MetricDataQueries': [{'Id': 'id', 'MetricStat': {'Metric': {'Namespace': 'AWS/Usage', 'MetricName': 'ResourceCount', 'Dimensions': [{'Name': 'Type', 'Value': 'Resource'}, {'Name': 'Resource', 'Value': 'vCPU'}, {'Name': 'Service', 'Value': 'EC2'}, {'Name': 'Class', 'Value': 'Inf/Spot'}]}, 'Period': 300, 'Stat': 'Average'}}], 'StartTime': datetime.datetime(2022, 4, 29, 4, 45, 57, 63626), 'EndTime': datetime.datetime(2022, 4, 29, 5, 45, 57, 63646), 'ScanBy': 'TimestampDescending', 'MaxDatapoints': 1}
2022-04-29 15:46:57,162 [DEBUG connectionpool.py:456 - urllib3.connectionpool._make_request() ] https://monitoring.ap-southeast-2.amazonaws.com:443 "POST / HTTP/1.1" 200 679
2022-04-29 15:46:57,164 [WARNING base.py:372 - awslimitchecker.services.base._get_cloudwatch_usage_latest() ] No data points found for AWS/Usage metric ResourceCount with dimensions [{'Name': 'Type', 'Value': 'Resource'}, {'Name': 'Resource', 'Value': 'vCPU'}, {'Name': 'Service', 'Value': 'EC2'}, {'Name': 'Class', 'Value': 'Inf/Spot'}]; using value of zero!
2022-04-29 15:46:57,164 [DEBUG base.py:362 - awslimitchecker.services.base._get_cloudwatch_usage_latest() ] Querying CloudWatch GetMetricData: {'MetricDataQueries': [{'Id': 'id', 'MetricStat': {'Metric': {'Namespace': 'AWS/Usage', 'MetricName': 'ResourceCount', 'Dimensions': [{'Name': 'Type', 'Value': 'Resource'}, {'Name': 'Resource', 'Value': 'vCPU'}, {'Name': 'Service', 'Value': 'EC2'}, {'Name': 'Class', 'Value': 'P/Spot'}]}, 'Period': 300, 'Stat': 'Average'}}], 'StartTime': datetime.datetime(2022, 4, 29, 4, 45, 57, 164514), 'EndTime': datetime.datetime(2022, 4, 29, 5, 45, 57, 164533), 'ScanBy': 'TimestampDescending', 'MaxDatapoints': 1}
2022-04-29 15:46:57,202 [DEBUG connectionpool.py:456 - urllib3.connectionpool._make_request() ] https://monitoring.ap-southeast-2.amazonaws.com:443 "POST / HTTP/1.1" 200 679
2022-04-29 15:46:57,204 [WARNING base.py:372 - awslimitchecker.services.base._get_cloudwatch_usage_latest() ] No data points found for AWS/Usage metric ResourceCount with dimensions [{'Name': 'Type', 'Value': 'Resource'}, {'Name': 'Resource', 'Value': 'vCPU'}, {'Name': 'Service', 'Value': 'EC2'}, {'Name': 'Class', 'Value': 'P/Spot'}]; using value of zero!
2022-04-29 15:46:57,204 [DEBUG base.py:362 - awslimitchecker.services.base._get_cloudwatch_usage_latest() ] Querying CloudWatch GetMetricData: {'MetricDataQueries': [{'Id': 'id', 'MetricStat': {'Metric': {'Namespace': 'AWS/Usage', 'MetricName': 'ResourceCount', 'Dimensions': [{'Name': 'Type', 'Value': 'Resource'}, {'Name': 'Resource', 'Value': 'vCPU'}, {'Name': 'Service', 'Value': 'EC2'}, {'Name': 'Class', 'Value': 'X/Spot'}]}, 'Period': 300, 'Stat': 'Average'}}], 'StartTime': datetime.datetime(2022, 4, 29, 4, 45, 57, 204556), 'EndTime': datetime.datetime(2022, 4, 29, 5, 45, 57, 204575), 'ScanBy': 'TimestampDescending', 'MaxDatapoints': 1}
2022-04-29 15:46:57,242 [DEBUG connectionpool.py:456 - urllib3.connectionpool._make_request() ] https://monitoring.ap-southeast-2.amazonaws.com:443 "POST / HTTP/1.1" 200 679
2022-04-29 15:46:57,244 [WARNING base.py:372 - awslimitchecker.services.base._get_cloudwatch_usage_latest() ] No data points found for AWS/Usage metric ResourceCount with dimensions [{'Name': 'Type', 'Value': 'Resource'}, {'Name': 'Resource', 'Value': 'vCPU'}, {'Name': 'Service', 'Value': 'EC2'}, {'Name': 'Class', 'Value': 'X/Spot'}]; using value of zero!
2022-04-29 15:46:57,244 [DEBUG base.py:362 - awslimitchecker.services.base._get_cloudwatch_usage_latest() ] Querying CloudWatch GetMetricData: {'MetricDataQueries': [{'Id': 'id', 'MetricStat': {'Metric': {'Namespace': 'AWS/Usage', 'MetricName': 'ResourceCount', 'Dimensions': [{'Name': 'Type', 'Value': 'Resource'}, {'Name': 'Resource', 'Value': 'vCPU'}, {'Name': 'Service', 'Value': 'EC2'}, {'Name': 'Class', 'Value': 'Standard/Spot'}]}, 'Period': 300, 'Stat': 'Average'}}], 'StartTime': datetime.datetime(2022, 4, 29, 4, 45, 57, 244689), 'EndTime': datetime.datetime(2022, 4, 29, 5, 45, 57, 244709), 'ScanBy': 'TimestampDescending', 'MaxDatapoints': 1}
2022-04-29 15:46:57,248 [DEBUG connectionpool.py:273 - urllib3.connectionpool._get_conn() ] Resetting dropped connection: monitoring.ap-southeast-2.amazonaws.com
2022-04-29 15:46:57,366 [DEBUG connectionpool.py:456 - urllib3.connectionpool._make_request() ] https://monitoring.ap-southeast-2.amazonaws.com:443 "POST / HTTP/1.1" 200 797
2022-04-29 15:46:57,367 [DEBUG base.py:377 - awslimitchecker.services.base._get_cloudwatch_usage_latest() ] CloudWatch metric query returned value of 88.0 with timestamp 2022-04-29 05:40:00+00:00
2022-04-29 15:46:57,367 [DEBUG ec2.py:232 - awslimitchecker.services.ec2._find_usage_spot_fleets() ] Getting spot fleet request usage
2022-04-29 15:46:57,463 [DEBUG connectionpool.py:456 - urllib3.connectionpool._make_request() ] https://ec2.ap-southeast-2.amazonaws.com:443 "POST / HTTP/1.1" 200 None
2022-04-29 15:46:57,491 [DEBUG ec2.py:251 - awslimitchecker.services.ec2._find_usage_spot_fleets() ] Skipping spot fleet request sfr-94415dc4-026d-4016-bfd8-b92b2cad545f in state modifying
2022-04-29 15:46:57,491 [DEBUG ec2.py:138 - awslimitchecker.services.ec2.find_usage() ] Done checking usage.

2022-04-29 15:46:57,492 [INFO runner.py:522 - root.console_entry_point() ] Finished checking limits in 4.624623775482178 seconds

Expected Output

There is absolutely no useful output. It simply says this several times for a normal run:

WARNING:awslimitchecker.services.base:No data points found for AWS/Usage metric ResourceCount with dimensions [{'Name': 'Type', 'Value': 'Resource'}, {'Name': 'Resource', 'Value': 'vCPU'}, {'Name': 'Service', 'Value': 'EC2'}, {'Name': 'Class', 'Value': 'Inf/Spot'}]; using value of zero!

Testing Assistance

Happy to help test.

jantman commented 2 years ago

What output are you expecting? awslimitchecker --service EC2 is not expected to generate any output unless you've exceeded at least the warning threshold of one of your EC2 service limits.

Perhaps awslimitchecker --show-usage --service EC2 is more like what you're looking for?

AddisonG commented 2 years ago

Thanks @jantman - You are correct. My bad.

I should have read over all of the --help arguments first (it's not on Getting Started), but I just assumed that it would show usage by default.

Thanks for maintaining this and responding so promptly.