Search code examples
amazon-web-servicesaws-lambdaamazon-dynamodb-streams

Does Lambda would retry the message if it fails for that?


I have a lambda subscribed to AWS Dynamodb streams. In this lambda, for each message from Dynamodb stream, it is calling a REST api. Now, my question if this REST api throws a error for some messages, and we throw that error from lambda handler, then what would happen? Will the lambda would retry to call the REST api with the message again or it would fail or it would skip the message? If it will retry, for how long will it retry? Does lambda maintain some kind of checkpoint


Solution

  • Per the docs at https://docs.aws.amazon.com/lambda/latest/dg/retries-on-errors.html:

    When a Lambda function invocation fails, AWS Lambda attempts to process the erring batch of records until the time the data expires, which can be up to seven days.