- Newest
- Most votes
- Most comments
When exporting CloudWatch Log Insights query results to a file (such as CSV, JSON, or table format), the clickable links to specific log streams are not preserved. This is because the exported file is a static representation of the data and doesn't maintain the interactive features available in the CloudWatch console.
However, you can still include the necessary information in your exported file to manually reconstruct the links or locate the specific log entries. Your current query is already including the essential fields:
- @timestamp: Provides the exact time of the log entry
- @message: Contains the actual log message
- @logStream: Identifies the specific log stream
- @log: Indicates which log group the entry belongs to (important when querying multiple log groups)
By including these fields in your export, you'll have all the information needed to locate the specific log entries in the CloudWatch console manually. While it's not as convenient as having clickable links, it allows you to pinpoint the exact location of each error log.
If you need to programmatically access these logs later, you can use the AWS CLI or SDKs to retrieve the specific log events using the log group, log stream, and timestamp information from your exported file.
Remember that the ability to generate clickable links in the CloudWatch console is a feature of the web interface and is not something that can be directly replicated in a static exported file. The export functionality is designed to provide the raw data, which you can then use for further analysis or processing as needed.
Sources
CloudWatch Log Insights results @LogStream not always clickable. | AWS re:Post
Searching in a log group no longer shows hyperlink to go to log stream | AWS re:Post
Relevant content
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 6 months ago
