I'm invoking a lambda function with boto3, with:
import boto3
import json
client = boto3.client('lambda')
response = client.invoke(
InvocationType='RequestResponse',
FunctionName=test_lambda_arn,
LogType='Tail',
Payload=json.dumps(data)
)
It's raising a botocore.vendored.requests.exceptions.ReadTimeout exception after 626 seconds. I have configured this lambda to time out after 100 seconds. I did so when I created it with boto. When I go into the AWS console it says that this lambda has a timeout of 1 minute and 40 seconds.
So why does the invoke command timeout after 626 seconds, and not after 100 seconds?
Is it because of retries? If so, how can I disable retries?
Edit: In the CloudWatch logs I can see multiple invocations for each client.invoke call. Therefore there is some automatic retry thing happening. Here are the docs for client.invoke.