Skip to content

Instantly share code, notes, and snippets.

@tjmw
Created July 3, 2024 15:09
Show Gist options
  • Save tjmw/c345d8480452cee5311d5fddcd9bd2eb to your computer and use it in GitHub Desktop.
Save tjmw/c345d8480452cee5311d5fddcd9bd2eb to your computer and use it in GitHub Desktop.
AWS CLI + jq to list alarm names in a cloudformation stack
AWS_REGION=xxx AWS_PROFILE=xxx aws cloudformation list-stack-resources --stack-name xxx |\
jq -c '.StackResourceSummaries[] | select(.ResourceType == "AWS::CloudWatch::Alarm") | {PhysicalResourceId}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment