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ヶ月前90ビュー
回答なし

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ