List Metrics from AWS CloudWatch

List error-metrics for an AWS API Gateway service:

aws cloudwatch list-metrics \
    --region us-east-1 \
    --namespace AWS/ApiGateway \
    --metric-name 5XXError \
    --dimensions '
[
  {
    "Name": "ApiName",
    "Value": "<service-name>"
  }
]
    '

Or all metrics for AWS Step Functions:

aws cloudwatch list-metrics \
    --region us-east-1 \
    --namespace AWS/States