How does deploying a fullstack app of next (including route handlers) on aws amplify work?
Unanswered
futuredevengineer posted this in #help-forum
as title said, i want to know
9 Replies
Sloth bear
Probably is a docker container.
You won't have the serverless and all things Vercel is doing.
I kind of managed to successfuly deploy on amplify, apparently, instead of separating server components logic from route handlers logic, i would just do the business logic (database calls) on server components, and forget about the route handlers.
this way, you won't have to make any
fetch
call from server component.you can use SST for it: https://sst.dev/docs/start/aws/nextjs/
It includes either deploying via OpenNext or via docker
It includes either deploying via OpenNext or via docker
btw, is it possible to setup nextauth on server component, so instead of having api route
api/auth/[...nextauth]
i would do the same setup but in server component?why do you want to handle something with a server component when you should handle that with a route handler? Using SST will handle that automatically for you
yeah well, whatever happening inside the route is basically a db call, that why
nah, it's not as you can see here: https://nextjs-forum.com/post/1317028837887840306#message-1317045971670274049 <--- click
Try SST and you'll see that everything will work fine
Try SST and you'll see that everything will work fine