title: How to handle timeouts in a python lambda?
body: <p>I know this has been questioned before, but no real solution was proposed and I was wondering if there any new ways nowadays.</p>
  
  <p>Is there anyway to hook an event using any AWS service to check if a lambda has timed out? I mean it logs into the CloudWatch logs that it timed out so there must be a way.</p>
  
  <p>Specifically in Python because its not so simple to keep checking if its reaching the 20 minute mark as you can with Javascript and other naturally concurrent languages.</p>
  
  <p>Ideally I want to execute a lambda if the python lambda times out, with the same payload the original one received.</p>