No, unfortunately you can't deploy the API directory like this, this is only for your static assets and for the api calls you will need a node server. You can use zeit's now to easily deploy the API, alternatively you can use any provider that supports node apps deployment and then running npm run build && npm run start.
You will need to do :
This will generate a static version of your app in the
out
directoryThen point Amplify Console to the out directory by setting artifacts -> baseDirectory in your amplify config : docs.aws.amazon.com/amplify/latest...
Thank you. Can I deploy Nextjs API with this?
No, unfortunately you can't deploy the API directory like this, this is only for your static assets and for the api calls you will need a node server. You can use zeit's now to easily deploy the API, alternatively you can use any provider that supports node apps deployment and then running npm run build && npm run start.
Why is the title of this article "Server-Side Rendered Real-time Web App with Next.js, AWS Amplify" if Amplify doesn't support SSR? 🤔
Amplify Console doesn't support SSR but you can use the Amplify API to populate the data for your page on the server side
I did same but still access denied error page on my production branch url - master.d1pgdow2brm58j.amplifyapp.com/
Ya I also have access denied when done generate the page. When start SSR build, it go to Access Denied.
I have attached
AdminstratorAccess
to the service role, but it still the same.Do you have any fix on this??