The usage metricset of aws module allows you to collects metrics that track the
usage of some AWS resources by querying AWS Cloudwatch API. Usage metrics
correspond to AWS service quotas and tracking these metrics can help users to
manage quotas proactively. Service quota usage metrics are collected by
Cloudwatch every minute. Therefore, 1-minute is the recommended period for this
metricset.

[float]
=== AWS Permissions
Some specific AWS permissions are required for IAM user to collect usage metrics.
----
ec2:DescribeRegions
cloudwatch:GetMetricData
cloudwatch:ListMetrics
tag:getResources
sts:GetCallerIdentity
iam:ListAccountAliases
----

[float]
=== Dashboard

The aws usage metricset comes with a predefined dashboard. For example:

image::./images/metricbeat-aws-usage-overview.png[]

[float]
=== Configuration example
[source,yaml]
----
- module: aws
  period: 1m
  metricsets:
    - usage
  # This module uses the aws cloudwatch metricset, all
  # the options for this metricset are also available here.
----

[float]
=== Metrics and Dimensions
Metrics:
|===
|Metric Name|Statistic Method | Description
|CallCount | Sum | The number of specified operations performed in your account.
|===

Dimensions:
|===
|Dimension Name| Description
|Resource | The name of the API operation.
|Service | The name of the AWS service containing the resource.
|Type | The type of resource being tracked. Currently, the only valid value is API.
|Class | The class of resource being tracked. CloudWatch API usage metrics use this dimension with a value of None.
|===

Please see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Usage-Metrics.html[CloudWatch Usage Metrics] for more details.
