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?

gefragt vor 4 Monaten89 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen