node.js – Can I connect a Replit web application to AWS DynamoDB, and should I use APIs or the AWS SDK?

I’m new to Replit and couldn’t find a clear answer in the documentation. I would like to build a web-based application on Replit that uses AWS DynamoDB as the primary data store.

My main questions are:

  1. Is it possible to connect a Replit-hosted web application to DynamoDB?

  2. What is the best approach? Should I:

Connect directly using the AWS SDK (e.g., aws-sdk for JavaScript/Node.js)?

Build a separate API layer (e.g., an AWS Lambda function with API Gateway) and have the Replit app interact with it?

If both are viable, what are the pros and cons of each approach in a Replit environment?

I appreciate any insights, and thanks in advance for your help!

Many thanks,
Nick

Read more here: Source link