Using HTML buttons how can I move the data from one DynamoDB table to other DynamoDB table in the same region?

0 votes
I am creating an application to give the demo of this application to my colleagues.

I am implementing e-commerce . For this, I am thinking of moving the data from one table to other. I.e Once the user add the product to cart , it will saved in Cart table in dynamo-db and in cart screen when the user clicks on 'Order'button/Link, the same data as it is in cart table should be moved to Order table and the cart should be empty So, the order can be confirmed.

How could I implement it?
Oct 24, 2018 in AWS by findingbugs
• 3,180 points
120 views

1 answer to this question.

0 votes
In a serverless way, i.e. from a static html page with no server-side backend, you could create a lambda function in the supported language of your choice and with the proper IAM role, to move the data from one table to the other - your html page could call it via an API call, and I would suggest you use AWS API Gateway to expose an api endpoint that then calls the lambda function.

If on (one of the other many) other-hands, say you were using ASP.net or PHP on the server side, you could use the AWSSDK to talk to the dynamodb directly and accomplish the same thing.

Besides these two options there are many, many alternatives and variations - and with all of the options you are also going to need to deal with authentication/security to make sure no one can make calls to your database/service that they aren't permitted to - perhaps not important for your demo application, but will definitely be an issue if/when you go live.
answered Oct 24, 2018 by Priyaj
• 57,300 points

Related Questions In AWS

0 votes
1 answer

How can I do Continuous data ingestion from on prem data sources to redshift

I can Recommend looking into AWS Schema ...READ MORE

answered Aug 8, 2018 in AWS by Priyaj
• 57,300 points
367 views
0 votes
1 answer
+1 vote
0 answers

How to get data from tables using java code - amazon DynamoDB

public void listAllCourses(@QueryParam("author") String authorQuery) { ...READ MORE

Aug 3 in AWS by Girija

edited Aug 5 by Kalgi 72 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How can i copy tables from one database to other on AWS?

You can use AWS Data pipeline to ...READ MORE

answered Jul 5, 2018 in AWS by Priyaj
• 57,300 points
85 views
0 votes
1 answer