Reputation: 10335
From the AWS CLI docs,
aws cloudwatch describe-alarms does not have a --namespace
argument to filter results.
On the other hand,
aws cloudwatch get-metric-statistics does have it.
Is it at all possible to filter the alarms by namespace with the AWS CLI?
Upvotes: 1
Views: 1897
Reputation: 760
You can use --query option in aws cli. The --query parameter accepts strings that are compliant with the JMESPath specification. It is pretty powerful tool to express filtering options.
For your use case
aws cloudwatch describe-alarms --query 'MetricAlarms[?Namespace==`AWS/DynamoDB`]'
Upvotes: 1