sst / ion

❍ — a new engine for SST
https://ion.sst.dev
MIT License
1.19k stars 149 forks source link

Configure vpc for next.js lambda? #261

Closed danielbush closed 3 months ago

danielbush commented 3 months ago

Is it possible to configure vpc, subnets and security group (and execution role) for the default lambda deployed by sst.aws.Nextjs? (similar to https://ion.sst.dev/docs/component/aws/function/#vpc ). If not, is it planned?

kane50613 commented 3 months ago

Same problem here, tried nextjs.nodes.server.apply() seems like not the right way.

kane50613 commented 3 months ago

maybe we could patch createServersAndDistribution manually in ssr-site.ts as a temp solution.

danielbush commented 3 months ago

If you do something let me know. I'll look at it again today.

danielbush commented 3 months ago

Same problem here, tried nextjs.nodes.server.apply() seems like not the right way.

@kane50613 Incidentally, did you get anywhere with that?

kane50613 commented 3 months ago

Same problem here, tried nextjs.nodes.server.apply() seems like not the right way.

@kane50613 Incidentally, did you get anywhere with that?

modify buildServerOrigin function add vpc prop then it works

kane50613 commented 3 months ago

Updated solution in #266

danielbush commented 3 months ago

Did one also, took me to just now to test it in my setup. I think I got my version to push up the subnets, security groups and the permissions.

fwang commented 3 months ago

Added support in v0.0.324