Skip to content

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

If you get the following error:

Read timeout on endpoint URL: "https://lambda.<region>.amazonaws.com/2015-03-31/functions/<function-name>/invocations"
Code language: plaintext (plaintext)

Then you are probably trying to use the aws cli to invoke an AWS Lambda function and it is timing out.

Other than making sure to set the Lambda execution time to something much higher than it is, you also need to make sure to specify the aws cli --cli-read-timeout argument to something that will cover the execution time.

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

Your original aws lambda invoke command

aws lambda invoke --invocation-type RequestResponse --function-name <function-name> --region <region> --log-type Tail --payload {"key":"value"} output.txt
Code language: Bash (bash)

Your updated aws lambda invoke command

Make sure to add --cli-read-timeout 900 (or equivalent time to match your lambda execution time)

aws lambda invoke --invocation-type RequestResponse --function-name <function-name> --region <region> --log-type Tail --cli-read-timeout 900 --payload {"key":"value"} output.txt
Code language: Bash (bash)

See also  How to Calculate String Rotation in Java
Tags:
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x