1 Answer
- Newest
- Most votes
- Most comments
0
You could write a python or other script in Lambda or off platform to query the cloud watch logs and then do the calculation between the two timestaps.
def lambda_handler(event, context):
client = boto3.client('logs')
# Specify your log groups
log_group1 = '/aws/lambda/your_lambda_function1'
log_group2 = '/aws/lambda/your_lambda_function2'
....... other code
response1 = client.start_query(
logGroupName=log_group1,
startTime=start_timestamp,
endTime=end_timestamp,
queryString='fields @timestamp, @message | sort @timestamp desc',
)
.... query other log....
calculate difference in time stamps
answered 10 months ago
Relevant content
- asked 5 years ago
- asked 6 months ago
- asked 8 months ago
- asked a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 3 months ago
Thankyou for the suggestion, sure I will try that. I guess doing it from the query will be easier, if you have a way to do it from query itself please let me know