A
A
acabun2021-08-18 20:09:15
Amazon Web Services
acabun, 2021-08-18 20:09:15

Why does AWS Lambda return "Error: connect ETIMEDOUT"?

I have two systems, Admin Panel(Laravel) and Online Shop(Woocommerce). The connection between them is implemented using "AWS Lambda"

When I send a request to update a product, the lambda periodically gives an error "Error: connect ETIMEDOUT" and does not update the product.

Initially I thought Wordpress was running out of time, so I increased the timeout to 60000ms. But that didn't help, and Lambda still throws errors.

Here it is still strange that the period between sending and the appearance of an error is only 2 minutes. That is, for any lambda, there should be enough time to send a request.

Another moment. Judging by the logs, when Lamda cannot connect to the Woocommerce API, the store is working properly. As if someone turns off the Internet this moment.

Actually the question is, why is this happening, what is the reason for the break?

Thank you in advance for your help.

PS Below I added logs with an error from the lambda.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim, 2021-08-30
@Viji

if both frontends work in the VPC, then try to put Lambda in the VPC too - there is nothing for her to go to the Internet. Correctly register ports in sec groups (usually 443 outboud should be enabled)
https://docs.aws.amazon.com/lambda/latest/dg/confi...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question