AWS Lambda - How to stop retries when there is a failure

前端 未结 9 1408
面向向阳花
面向向阳花 2020-12-05 06:49

I know that when a Lambda function fails (for example when there is a time out), it tries to run the function 3 more times again. Is there any way to avoid this behavior? I\

9条回答
  •  孤街浪徒
    2020-12-05 07:25

    If using python then need to put the code in try/catch block as well however there will be no callback. For example:

    try:
        do_something()
    except Exception as e:
        print('Error: ' + str(e))
    

    Since the error has been handled, Lambda will not retry.

提交回复
热议问题