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?

已提問 4 個月前檢視次數 89 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南