Is there any way of know if a lambda is running a Retry?

Viewed 30

I am trying to understand when a lambda function is running a retry. My retries are happening after a timeout or error is thrown. As far as I can tell the context or event doesn't look any different between running a first successful event and retrying.

Ideally, I would be able to do something like:

exports.handler = function(event, context) {
  if (context.retry) {
    ... do something
  }
  ...
}

Any ideas are appreciated thanks.

1 Answers
Related