AWS Lambda: Getting error again and again in Logs
Solution 1:
Check the MaximumRetryAttempts parameter from Event Source Mapping Configuration.
From docs:
MaximumRetryAttempts (Streams only) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.
With the default value, the function will retry to process the event indefinitely (until the records expire or exceed the maximum age that you configure on the event source mapping). You need to set an appropriate value according to your use case.