class, critical_threshold, boto_connection_kwargs, quotas_client)[source]


Describes an AWS service and its limits, and provides methods to query current utilization.

Constructors of _AwsService subclasses must not make any external connections; these must be made lazily as needed in other methods. _AwsService subclasses should be usable without any external network connections.

  • warning_threshold (int) – the default warning threshold, as an integer percentage, for any limits without a specifically-set threshold.
  • critical_threshold (int) – the default critical threshold, as an integer percentage, for any limits without a specifically-set threshold.
  • boto_connection_kwargs (dict) – Dictionary of keyword arguments to pass to boto connection methods.
  • quotas_client (ServiceQuotasClient or None) – Instance of ServiceQuotasClient
__module__ = ''

Find the ECS service usage for clusters. Calls _find_usage_one_cluster() for each cluster.


Find the usage for Fargate, via CloudWatch.


Find usage for services in each cluster.

Parameters:cluster_name (str) – name of the cluster to find usage for
api_name = 'ecs'

Determine the current usage for each limit of this service, and update corresponding Limit via _add_current_usage().

__NOTE__ that the “EC2 Tasks per Service (desired count)” limit uses non-standard resource IDs, as service names and ARNs aren’t unique by account or region, but only by cluster. i.e. the only way to uniquely identify an ECS Service is by the combination of service and cluster. As such, the resource_id field for usage values of the “EC2 Tasks per Service (desired count)” limit is a string of the form cluster=CLUSTER-NAME; service=SERVICE-NAME.


Return all known limits for this service, as a dict of their names to AwsLimit objects.

Returns:dict of limit names to AwsLimit objects
Return type:dict
quotas_service_code = 'ecs'

Return a list of IAM Actions required for this Service to function properly. All Actions will be shown with an Effect of “Allow” and a Resource of “*”.

Returns:list of IAM Action strings
Return type:list
service_name = 'ECS'