Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save subudear/1617ab0ce6cdb2887609309ec8be6d21 to your computer and use it in GitHub Desktop.

Select an option

Save subudear/1617ab0ce6cdb2887609309ec8be6d21 to your computer and use it in GitHub Desktop.
Show all AWS Cloudwatch log groups in json, text or table format
# Replace the AWS cloudwatch log group name
$log_group_name_to_search = "/aws/lambda/s"
#the below command shows all the log groups in TEXT format output
aws logs describe-log-groups --log-group-name-prefix $log_group_name_to_search --query logGroups --output text
#the below command shows all the log groups in JSON format output
aws logs describe-log-groups --log-group-name-prefix $log_group_name_to_search --query logGroups --output json
#the below command shows all the log groups in TABLE format output
aws logs describe-log-groups --log-group-name-prefix $log_group_name_to_search --query logGroups --output table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment