I understand you have are trying to display the log entry timestamp in the epoch format using boto3 logs query function.
The following can be achieved by using the toMillis() function, however it would display the floating point number as you had shared.
The suitable method would be to use the .time() function in order to achieve this particular use case as I have not found any additional method of achieving this conversion. It was noted that the cloudwatch insights console does permit timestamp conversion to epoch format, however this similar syntax cannot be seen in the Boto3 documentation.
I am positive this helps. Let me know if you have any follow-up questions as we can keep this thread open for additional discussions with the community.
Kind regards, Muhammad
- Accepted Answerasked a year ago
- asked 2 years ago
- How do I troubleshoot a CloudWatch Logs Insights query that shows errors or doesn't return the expected results?AWS OFFICIALUpdated 22 days ago
- How can I store an Amazon Athena query output in a format other than CSV, such as a compressed format?AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago
- EXPERTpublished 8 months ago