sst / ion

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

Feat Request - Split NextJS routes in more than one lambda #306

Closed dev2xl closed 2 months ago

dev2xl commented 2 months ago

Maybe this is already possible but I couldn't find any reference on the docs.

It would be great to be able to assign different memory size, and timeouts, for the different routes on a NextJS app.

If someone has a workaround or knows how to do this, please share. Thanks!

fwang commented 2 months ago

Hi @dev2xl, do u mind sharing a bit more about your use case:

NamesMT commented 2 months ago

Nextjs itself (or any current framework I think) doesn't support splitting routes into multiple functions. One way you can achieve what you want is setting up additional "job" functions, and invoke them from your main function.

dev2xl commented 2 months ago

I have managed to do this with open-next config on the v3 version as they stated on their website. Thanks for everything.

NamesMT commented 2 months ago

Wait what? @dev2xl If you have time could you public a repo that uses this?, Or maybe link some related docs? Super interested in this, but couldn't find the related docs for it. Have never heard of this native support by Next to split routes to multiple functions.