AWS Lambda, retries on timeout, Python SDK

slava-kohut

I was trying to invoke a Lambda function through the Python SDK in a synchronous fashion in a Jupyter notebook. An event I am sending is such that it takes more than the maximum possible timeout limit (15 min) to complete.

I noticed that the event sometimes (not always) is being re-sent to the lambda upon the timeout error. This keeps going on and on until I shutdown the lambda by setting its concurrency to 0. This never happens if I lower the timeout limit (e.g., 10 minutes), meaning, the event is never being re-sent, there is only one invocation in the log, only one error and no activity afterwards.

What is going on? How do I rationalize these observations?

Shawn

I recommend turning on DEBUG level debugging and examining CloudWatch logs when you see it get executed more than once. I've seen this sometimes, and when I do I usually see log entries that come from the SDK code itself that tell me it has some built-in retry logic that is executing. If the call to invoke the lambda doesn't get a proper response, it may retry the call again--but it is possible the service received the original request and executed it, yet something went wrong with the response and so the caller re-at

Check out what is said at this link: https://aws.amazon.com/premiumsupport/knowledge-center/lambda-function-retry-timeout-sdk/

Note: API calls can take longer than expected when network connection issues occur. Network issues can also cause retries and duplicated API requests. To prepare for these occurrences, your Lambda function must always be idempotent.

If you make an API call using an AWS SDK and the call fails, the SDK automatically retries the call. How long and how many times the SDK retries is determined by settings that vary among each SDK.

That article has tips for troubleshooting or changing config settings.

Also see https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

aws lambda SES function timeout

分類Dev

Configure Hazelcast CPSubsystem Retries Timeout

分類Dev

AWS Lambda timeout when another (long) Lambda is invoked

分類Dev

Python AWS Lambda Certificates

分類Dev

AWS lambda fails to call Facebook SDK

分類Dev

How to set AWS lambda timeout using request parameters?

分類Dev

AWS Python SDK Boto3

分類Dev

How to run SQLAlchemy on AWS Lambda in Python

分類Dev

Python 2.7 AWS Lambda Support will end in 2020?

分類Dev

AWS Java Sdkを使用したAWS LambdaとS3の統合

分類Dev

Access to AWS Elastic Load Balancer using AWS SDK for python

分類Dev

AWS Gateway timeout

分類Dev

Lambda用のAWS SDK V2 Maven libとは何ですか?

分類Dev

AWS Lambda:Oracle Java SDKを使用することは可能ですか?

分類Dev

AWS TimeStream Python SDK: Cannot create a correct client object

分類Dev

AWS Lambda Python libsslCライブラリ

分類Dev

Send Post request to an external API using AWS Lambda in python

分類Dev

How to reduce the size of packaged python zip files for AWS Lambda

分類Dev

How do I invoke a step function using AWS Lambda ( Python)

分類Dev

NoSuchKey in resize images using python on AWS (lambda + s3)

分類Dev

AWS Lambda + python:ec2.start_instances(InstancesIds = ??)

分類Dev

AWS Athena JDBC Query timeout

分類Dev

AWS Lambda boto3 : Instance launch from lambda boto3 python eroor

分類Dev

AWS SDK for Java2.0を使用してLambda関数を作成する方法

分類Dev

Googlescript and AWS SDK

分類Dev

Pandas & AWS Lambda

分類Dev

Pandas & AWS Lambda

分類Dev

AWS Lambda Payloads

分類Dev

AWS Lambda NoClassDefFoundError

Related 関連記事

ホットタグ

アーカイブ