Next.js Discord

Discord Forum

How does deploying a fullstack app of next (including route handlers) on aws amplify work?

Unanswered
futuredevengineer posted this in #help-forum
Open in Discord
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.
@Sloth bear 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.
@futuredevengineer as title said, i want to know
you can use SST for it: https://sst.dev/docs/start/aws/nextjs/
It includes either deploying via OpenNext or via docker
@B33fb0n3 you can use SST for it: https://sst.dev/docs/start/aws/nextjs/ 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?
@futuredevengineer 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
@futuredevengineer 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