Created
October 2, 2018 04:20
-
-
Save subudear/1617ab0ce6cdb2887609309ec8be6d21 to your computer and use it in GitHub Desktop.
Show all AWS Cloudwatch log groups in json, text or table format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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