https://serverless-stack.com/ logo
#help
Title
# help
m

Mendel Lerner

03/25/2022, 8:23 PM
Hi Everyone, I'm having trouble with the local dev environment. I have a Lambda in a VPC with a Security Group that allows all egress, triggered by an S3 event. It works fine when fully deployed. When using the local dev environment, it simply hangs and times out (even for much longer time limits):
Copy code
2022-03-25T16:19:13.067-04:00	START RequestId: 31bcc1ae-8648-4f40-84c5-a2574533fe58 Version: $LATEST 
2022-03-25T16:19:13.156-04:00	2022-03-25T20:19:13.097Z 31bcc1ae-8648-4f40-84c5-a2574533fe58 INFO connectAndSendMessage()
2022-03-25T16:19:18.076-04:00	END RequestId: 31bcc1ae-8648-4f40-84c5-a2574533fe58
2022-03-25T16:19:18.076-04:00	REPORT RequestId: 31bcc1ae-8648-4f40-84c5-a2574533fe58 Duration: 5007.89 ms Billed Duration: 5000 ms Memory Size: 128 MB Max Memory Used: 80 MB Init Duration: 469.73
Any ideas for what to troubleshoot?
t

thdxr

03/25/2022, 8:24 PM
is it possible to test it while conditionally disabling vpc in local dev
eg
vpc: app.local ? undefined : vpc
f

Frank

03/26/2022, 6:41 AM
@Mendel Lerner are your other functions also in the same VPC? And do they also time out?
s

Seth Geoghegan

03/26/2022, 2:57 PM
Is your local dev environment running in the same VPC via a VPN client?
m

Mendel Lerner

03/28/2022, 6:24 PM
Functions outside the VPC work fine. The Lambda seems to work from the AWS side (which is where the logs above are from) but the websocket never connects to my machine, I get the timeout log and whatever runs in the stub setup, but nothing in the
_<http://ref.ws|ref.ws>.onopen
function
j

Jay

04/11/2022, 11:27 PM
@Mendel Lerner just checking, are you still having this issue?
m

Mendel Lerner

04/12/2022, 8:40 PM
@Jay, Thanks for checking in. I stopped work on the project for a few days and when I came back it was working fine again
j

Jay

04/12/2022, 8:41 PM
Oh interesting. Feel free to post again if something comes up!
2 Views