Is it a good idea to access DynamoDB directly from Next.js App with SSR that deployed on Amplify?

0

Recently, I deployed a Next.js 14 app with App router to AWS Amplify, and I added authentication by using Cognito. As we know, now we can use SSR feature on AWS Amplify, such as server-side rendering and server action from Next.js 14. And I found that we can provide aws config and cognito credential in the server-side function to make Next.js app able to access DynamoDB and fetch data or modify data, without developing APIs with AppSync or Lambda. In this case, we can also limit access to DynamoDB by only allowing authenticated users by adding AssumeRole on Cognito identity pool. Accessing DynamoDB from Amplify SSR function directly makes developing the app much easier, but my question is, is this a proper use of Amplify SSR feature? Is there are limitations or performance issues in this architecture?

preguntada hace 4 meses89 visualizaciones
No hay respuestas

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas