0

I am currently building a serverless solution and run into a corner, basically i have a table and i want to be able to read data from that table in real-time as new entities are saved in the table from my client(front end react application). I have come across multiple solutions during research and i still am not sure which is best for my use case. I saw dynamodb streams allows you to get data as its being placed in the table, but i am still unsure as to how i can plug this in to my frontend to read the data, i also saw kinesis streams, and web socket api, the web socket api. im confused as to which to use.

My use case: i have an orders table, where users place orders and i want when a user places an order to my order table, my front end(react) should be able to pick up that data and display it.

Can any aws devs direct me to a service that will be best to implement this usecase?

  • 1
    You may want to check out AppSync – luk2302 May 15 '21 at 11:31
  • to elaborate on luk2302 answer, if you want to get data live from the front end, you'll need to use something like web sockets. DynamoDB does not support this out of the box, you'll need to create an API in front of dynamodb to do this. You can use AppSync to create a GraphQL API in front of dynamoDB tables and then use AppSync subscriptions to have your web front end get live updates when data is added/updated – JD D May 15 '21 at 15:30

1 Answers1

0

you can use Appsync Subscription, whenever a new order in your dynamoDb table Subscription will show it.

Rajesh
  • 40
  • 1
  • 3