[Solved] Learn timeout on endpoint URL: “https://lambda.[region].amazonaws.com/2015-03-31/capabilities/[function-name]/invocations”

In case you get the next error:

Learn timeout on endpoint URL: "https://lambda.<area>.amazonaws.com/2015-03-31/capabilities/<function-name>/invocations"

Then you’re most likely attempting to make use of the aws cli to invoke an AWS Lambda operate and it’s timing out.

Aside from ensuring to set the Lambda execution time to one thing a lot increased than it’s, you additionally want to ensure to specify the aws cli --cli-read-timeout argument to one thing that can cowl the execution time.

https://docs.aws.amazon.com/cli/newest/reference/index.html

Your authentic aws lambda invoke command#

aws lambda invoke --invocation-type RequestResponse --function-name <function-name> --region <area> --log-type Tail --payload {"key":"worth"} output.txt

Your up to date aws lambda invoke command#

Be sure so as to add --cli-read-timeout 900 (or equal time to match your lambda execution time)

aws lambda invoke --invocation-type RequestResponse --function-name <function-name> --region <area> --log-type Tail --cli-read-timeout 900 --payload {"key":"worth"} output.txt