# DynamoDB Transactions: An E-Commerce with Amazon DynamoDB

DevFeed: [DynamoDB Transactions: An E-Commerce with Amazon DynamoDB](<https://devfeed.tech/articles/dynamodb-transactions-an-e-commerce-with-amazon-dynamodb-18010.md>)

Original publisher: [Read original article](<https://blog.guilleojeda.com/dynamodb-transactions>)

Author: Guillermo Ojeda

Published: 2023-11-09T18:42:01Z

Content type: tutorial

Language: en

Sources: [Guille Ojeda](<https://devfeed.tech/sources/guille-ojeda.md>)

Topics: [Amazon DynamoDB](<https://devfeed.tech/topics/amazon-dynamodb.md>), [Database](<https://devfeed.tech/topics/database.md>), [NoSQL](<https://devfeed.tech/topics/nosql.md>), [Amazon Web Services](<https://devfeed.tech/topics/aws.md>), [Back end](<https://devfeed.tech/topics/backend.md>)

Tags: [acid](<https://devfeed.tech/tags/acid.md>), [amazon-dynamodb](<https://devfeed.tech/tags/amazon-dynamodb.md>), [amazon-web-services](<https://devfeed.tech/tags/amazon-web-services.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [aws](<https://devfeed.tech/tags/aws.md>), [backend](<https://devfeed.tech/tags/backend.md>), [customers](<https://devfeed.tech/tags/customers.md>), [database](<https://devfeed.tech/tags/database.md>), [databases](<https://devfeed.tech/tags/databases.md>), [dynamodb](<https://devfeed.tech/tags/dynamodb.md>), [e-commerce](<https://devfeed.tech/tags/e-commerce.md>), [nosql](<https://devfeed.tech/tags/nosql.md>), [operations](<https://devfeed.tech/tags/operations.md>), [products](<https://devfeed.tech/tags/products.md>)

## AI overview

This tutorial explains how to use DynamoDB transactions in an e-commerce application to atomically verify product stock, decrement inventory, and create an order. It describes the race condition that can occur when separate read and write operations process simultaneous purchases.

## Source excerpt

We're building an e-commerce app with DynamoDB for the database, pretty similar to the one we built for the DynamoDB Database Design article. No need to go read that issue (though I think it came up great), here's how our database works: Customers a...