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,260 points
777 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
• 58,060 points

Related Questions In AWS

+1 vote
1 answer
0 votes
0 answers
0 votes
1 answer

How to delete huge data from DynamoDB table in AWS?

Hi@akhtar, If you required to delete all the ...READ MORE

answered Dec 16, 2020 in AWS by MD
• 95,340 points
1,748 views
0 votes
1 answer

How much will it cost to read from an S3 bucket in the same region but on different account

There will be no data transfer cost ...READ MORE

answered Feb 17 in AWS by anonymous
45 views
0 votes
1 answer
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
• 58,060 points
1,526 views
0 votes
1 answer

How to load data into a table in DynamoDB using Java?

You can create a .json file with the ...READ MORE

answered Feb 26, 2019 in AWS by Priyaj
• 58,060 points
4,544 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP