I have an AWS Lambda function that is invoked when an instance gets terminated and this the message is stored in Amazon CloudWatch Logs.
I want to extract and filter these log messages to get a particular ID. How can I extract the logs and filter it using Python?