so I just realized your Lambda func has to be in a...
# help
s
so I just realized your Lambda func has to be in a VPC to use EFS. are there any drawbacks to this, for the Lambda func? will it break anything? I know that Lambdas in a VPC can’t access the outside Internet, but I don’t need that in this case
t
Lambdas in a VPC can access the outside internet, I currently use this with an rds system I have as a prototype
s
you’re using a NAT Gateway then?
t
The main drawback is you now pay for a managed nat which means it doesn't scale to 0
Yeah
s
NATG is the worst ripoff in the AWS ecosystem
well, this is the beauty of SST. I can test my app with the Lambda func in a VPC and make sure everything works ok, and not affect production
hey @thdxr, anything to keep in mind when using Lambdas in VPC, with SST debug? I just noticed that my Lambda func which usually executes a 2nd function failed to execute it. like, I don’t see it in the SST output as being invoked at all
oh! it’s stuck for some reason:
Copy code
START RequestId: 6caf3fc0-8507-499a-a7b5-a10613a7cafa Version: $LATEST
2021-12-01T03:11:34.179Z	6caf3fc0-8507-499a-a7b5-a10613a7cafa	INFO	connectAndSendMessage()
t
I think there's some issues with sst and vpc. I conditionally add the vpc only when non local
s
ohh.. I bet because it’s trying to connect outside the VPC and I’m not using a NAT Gateway
t
EFS won't work in local dev anyway
s
oh.. crap. hmm. that’s right, the Lambdas are using my Mac’s filesystem
ok, so that means I’ll have to make the whole EFS & VPC thing conditional
thanks for that tip! I would’ve been scratching my head over that one for a while