Replies: 2 comments 1 reply
-
Hi @Nic-vwalt, A couple of thoughts here. Moreover, the fact that you mentioned you are using Lambda, makes me wonder if you Lambda is timing out before you code is finished running, you'll see timeout. By default Lambda timeout is set to 3 seconds. Perhaps you need to configure your Lambda with a longer timeout value? Thanks, |
Beta Was this translation helpful? Give feedback.
-
First off, apologies to maintainer for light-necro. Thank you for actually leaving the solution! I have been looking around passively on the internet for this issue for a few months whenever it was biting us hard. I can confirm this works in nodejs as well, since this is an infrastructure issue, this seems to have also solved my problem of Cognito timing out even when it is set to the maximum 30s. This likely expands to all AWS services except the issue with Cognito is that it doesn't have a VPC Endpoint so you can't get around this issue. |
Beta Was this translation helpful? Give feedback.
-
My go web server is being run on a single AWS lambda invocation. Currently its limited to 1 invocation at a time.
75% of the time when a new invocation is started up there are no issues, but the rest of the time my cognito client randomly times out.
SOLVED!
UPDATE: Seems the issue was with my VPC's subnets - It was starting up in either a public or private subnet and didn't have any internet access when started inside the public one.
I've tried playing with a longer timeout period and only 1 try, but a retry has never been of any use. Once a Cognito Client times out on the lambda invocation the retries are useless.
Beta Was this translation helpful? Give feedback.
All reactions