- Newest
- Most votes
- Most comments
Based on the information provided and the available documentation, it appears that you may be encountering an issue with the AWS CLI or the underlying API for CloudWatch Logs Insights when trying to filter queries by the "CWLI" query language.
The behavior you're describing, where client-side filtering shows results for both "CWLI" and "SQL" query languages, but API-level filtering only works for "SQL" and not for "CWLI", suggests there might be a discrepancy in how the API is handling the "CWLI" query language parameter.
CloudWatch Logs Insights does support multiple query languages, including Logs Insights Query Language (which is likely what "CWLI" refers to), SQL, and PPL (Piped Processing Language). The fact that you can see "CWLI" queries when using client-side filtering indicates that these queries do exist in your account.
However, the inability to filter for "CWLI" queries using the --query-language option in the aws logs describe-queries command could potentially be a bug or limitation in the API or CLI implementation.
To troubleshoot this issue, you could try the following:
- Ensure you're using the latest version of the AWS CLI.
- Try using the full name "CloudWatchLogsInsights" instead of "CWLI" for the query language parameter, if you haven't already.
- Check if the issue persists when using the AWS SDK or making direct API calls instead of using the CLI.
- If the problem continues, it would be advisable to contact AWS support or report this as a potential bug through the AWS forums or GitHub repository for the AWS CLI.
In the meantime, you may need to rely on client-side filtering using the --query option as a workaround to filter for "CWLI" queries.
Sources
Analyzing log data with CloudWatch Logs Insights - Amazon CloudWatch Logs
Troubleshoot a CloudWatch Logs Insights query that returns errors | AWS re:Post
CloudWatch Logs Insights language query syntax - Amazon CloudWatch Logs
Relevant content
- asked 2 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 months ago
