1. Ably FAQs
  2. Integrations
  3. Events, Webhooks and Functions

Why are my Lambdas occasionally triggered more than once?

When Ably invokes a Lambda function it does so asynchronously, with an `event` invocation type. In this invocation mode, AWS will independently retry the function execution in a number of scenarios. For example, if the function returns an error, Lambda attempts to run it two more times, with a one-minute wait between the first two attempts, and two minutes between the second and third attempts. See https://docs.aws.amazon.com/lambda/latest/dg/invocation-retries.html and https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html for more information.

 

We have no control over this at the point of executing the function, but you can tweak retry settings in your AWS Lambda console, see https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-errors for more information on how to do this.
 

If you have further questions then please contact us by emailing support@ably.com