Serverless Developer Guide
• An item is deleted from the table: the stream captures an image of the entire item before it was 
deleted.
Each stream record also contains the name of the table, the event timestamp, and other metadata. 
Stream records have a lifetime of 24 hours; after that, they are automatically removed from the 
stream.
You can use DynamoDB Streams together with AWS Lambda to create an event source mapping—
a resource that invokes your Lambda function automatically whenever an event of interest appears 
in a stream
For example, consider a Customers table that contains customer information for a company. 
Suppose that you want to send a "welcome" email to each new customer. You could enable a 
stream on that table, and then associate the stream with a Lambda function. The Lambda function 
would run whenever a new stream record appears, but only process new items added to the
Customers table. For any item that has an EmailAddress attribute, the Lambda function would 
invoke Amazon Simple Email Service (Amazon SES) to send an email to that address.
Related resources:
• Change data capture with Amazon DynamoDB -- stream item-level change data in near-real time
• Change data capture for DynamoDB Streams - DynamoDB Streams captures a time-ordered 
sequence of item-level modiﬁcations in any DynamoDB table and stores this information in a log 
for up to 24 hours.
Transactions
Amazon DynamoDB transactions simplify the developer experience of making coordinated, all-or-
nothing changes to multiple items both within and across tables. Transactions provide atomicity, 
consistency, isolation, and durability (ACID) enabling you to maintain data correctness in your 
applications more easily.
You can use the DynamoDB transactional read and write APIs to manage complex business 
workﬂows that require adding, updating, or deleting multiple items as a single, all-or-nothing 
operation. With the transaction write API, you can group multiple Put, Update, Delete, and
ConditionCheck actions. You can then submit the actions as a single TransactWriteItems
operation that either succeeds or fails as a unit.
Related resource:
Advanced Topics 82