Reputation: 140
I am attempting to call one lambda function from another, and the code I am using in the calling function is:
client=boto3.client('lambda')
services={'Image_Processor':'arn'}
response=client.invoke(FunctionName=services[event['service']], InvocationType='DryRun', Payload=json.dumps(event))
There is no error message given, and I have tried setting the timeout duration as long as 10 minutes, but I still cannot get any result except:
{
"errorMessage": "2021-08-12T17:13:18.946Z de2feefa-9923-40bd-a555-bf5de54712ee Task timed out after 20.02 seconds"
}
Any help would be very greatly appreciated.
Upvotes: 0
Views: 1323
Reputation: 269091
It appears that you are saying that Lambda function A is timing out when invoking Lambda function B.
A common scenario is that the timeout is caused by Lambda function A not having access to the Internet. The AWS API endpoint is on the Internet and Lambda function A requires Internet access to invoke Lambda function B.
To have Internet access, the Lambda function should either:
Upvotes: 2