Slack search is doing me no good, but is there som...
# help
e
Slack search is doing me no good, but is there some type of
onExit
event where we could tear down resources for dev envs when process exits?
or is it just better to put it into the debugger stack on process exit?
t
Is there a reason you want to tear down the environment when sst start ends? Most serverless resources cost nothing when not being used
e
well the vpcs created for each dev's env
we want to hopefully spin those down
the other route is to just share a VPC, but seemed more work initially across orgs
t
do the VPCs have a managed nat? is that's what's costing money?
if I do need a VPC I typically don't use one for local dev environments (simple with an
if(app.local)
check
e
yea its the nat, I think the other route was to run a local instance of postgres, but if is a vpc/nat not required for local dev? do you mean you ignore vpc and can still interact with a serverless rds?
t
when I use serverless RDS I use data api (through kysely) which doesn't require a VPN so you can put it in a VPC without a managed NAT or I use local postgres in docker which isn't too bad
I generally avoid VPCs entirely though, it's possible to do that even for prod if you commit to it
e
gotcha, we ended up using the knex data api connection so we should be able to do that
t
Nice! Yeah vpc-less is the way to go, those managed NATs are $$$
r
@thdxr have you ever needed to provide a static ip address for calls from lambda to 3rd party APIs? I can't see an option other than a VPC and NGW with EIP
e
appreciate the thoughts thxdr
t
@Ross Coundon yes I know of one setup that needs they. They already had a vpc so they used it but I would have probably setup a single lambda in a vpn to serve as a proxy or found a service that offers an http proxy
c
I think the only thing @thdxr loves more than 'SSM for everything' is 'VPCs for nothing' 😛