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?

asked 3 months ago83 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions