By default, AWS Lambda retries failed executions twice. This can be confusing when debugging based on function output logs. Control the lambda execution behavior using cloudformation with Lambda Event Configuration:
https://stackoverflow.com/questions/61015330/how-can-i-set-the-maximumretryattempt-for-aws-lambda-in-the-cloudformation-lambd