You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a query to return only the ARN for the first result 'MetricAlarms[0].AlarmArn' when calling aws cloudwatch describe-alarms in combination with --output 'text', multiple results are output.
These results seem to be the first result from each additional page returned.
Regression Issue
Select this option if this issue appears to be a regression.
georgealton
changed the title
Text output prints results from multiple pages
CloudWatch DescribeAlarms Output Text outputs Results from multiple pages
Mar 25, 2025
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
Describe the bug
When using a query to return only the ARN for the first result
'MetricAlarms[0].AlarmArn'
when callingaws cloudwatch describe-alarms
in combination with--output 'text'
, multiple results are output.These results seem to be the first result from each additional page returned.
Regression Issue
Expected Behavior
Only 1 ARN should be output
Current Behavior
Reproduction Steps
AWS::CloudWatch::Alarm
(enough to causes the response to paginate)aws cloudwatch describe-alarms --query 'MetricAlarms[0].AlarmArn' --output text
Possible Solution
Using No Paginate seems to be a workaround here.
And points to an issue the collection and processing of the results from multiple pages.
Additional Information/Context
Seems to only affect
--output text
, omitting returns the JSON stringI also tried to set
--max-items 1
but this produces an extraNone
in the outputCLI version used
aws-cli/2.17.6 Python/3.12.9 Linux/6.13.7-401.asahi.fc40.aarch64+16k source/aarch64.fedora-asahi-remix.40
Environment details (OS name and version, etc.)
asahi linux (fedora)
The text was updated successfully, but these errors were encountered: