amazon web services – AWS Lambda timing out when I try to initiatize the Lambda() function from ‘aws-sdk’
I am trying to invoke another lambda function from one lambda. However, even before getting to the invoke() line, lambda is timing out after 10 seconds. Here is the code:
import { Lambda } from "aws-sdk";
var lambda = new Lambda({ region: 'us-east-1' }) //Timing out at this line even when I comment out the below lines
/*lambda.invoke( {
FunctionName: 'arn:aws:lambda:us-east-1:99999999999:function:myfunction',
InvocationType: 'Event',
Payload: JSON.stringify({ test: "message" })
}).promise()*/
Why is it taking so long just to initialize the method? If the problem is with the IAM role execution, shouldn’t the error be different ?
Read more here: Source link