AWS DynamoDB - Working with Streams Last Updated : 28 Mar, 2023 Comments Improve Suggest changes Like Article Like Report DynamoDB Streams is a DynamoDB feature that allows users to keep track of any changes made to the data in DynamoDB. It is an "ordered flow of data" that contains information about changes made to the data in the DynamoDB table. Let us talk of a use case. Consider a "users" table in DynamoDB and your application demands to do some pre-processing/verification of user information whenever a new user is added or user data is changed. You can enable dynamo DB streams for this data, which will allow you to access the log about all the changes made to any data in this table, in near-real-time. Features of DyanamoDB streamsData is stored for up to 24 hours. Any application processing data in DynamoDB Streams must consume the data within 24 hours to avoid any data loss.Streams for an encrypted DynamoDB table are encrypted.Enable streams on a DynamoDB table Follow the below steps to enable streams on the DynamoDB table: Step 1: Open the AWS console. Navigate to DynamoDB Dashboard -> Choose tables -> Select the existing table you want to enable DynamoDB streams for. Click on Manage DynamoDB Streams Button as shown below. Step 2: Chose the appropriate option for your use case and click on Enable. Keys only - Only the key attributes of the modified item are received in the stream.New image - The entire updated item is received, as it appears after the update happened.Old image - The entire updated item is received, as it appears before the update happened.New and old images - Both records of the updated item are received, as it appears before and after the update happened. This will enable DynamoDB streams which will receive logs of all the changes made to data in DynamoDB. Please note that if you perform PUT or UPDATE operations in the table and no item is modified the operation logs/data are not recorded in DynamoDB streams. Using Data in DynamoDB streams DynamoDB Stream Data provides you with near real-time data consisting of all changes made to the DynamoDB Table. To read and process a stream, you need to create a custom application, which must connect to the DynamoDB Streams endpoint through API requests. Another way of connecting to DynamoDB streams is to create a DynamoDB trigger in AWS Lambda. Every time data is pushed into DynamoDB streams it invokes a Lambda Function for processing. Adding a lambda trigger: Comment More infoAdvertise with us Next Article AWS DynamoDB - Working with Tables M mananutsav7 Follow Improve Article Tags : DynamoDB AWS DynamoDB Similar Reads AWS DynamoDB - Working with Scans Amazon DynamoDB is NoSQL managed database that stores semi-structured data like key-value pairs and document data. When creating tables in DynamoDB, no schema structure is required but only a partition key (primary key) is required. DynamoDB tables stores data in form of items and each item consists 3 min read AWS DynamoDB - Working with Tables In this article, we will work on DynamoDB tables. DynamoDB is a NoSQL database that stores document data or key-value pairs. A Dynamodb table consists of items and each item is made up of attributes. Different items can have different attributes. See the below example: Example 1: { "MovieID": 123, " 3 min read AWS DynamoDB - Working with Queries Amazon DynamoDB is a NoSQL managed database service provided by Amazon that stores semi-structured data like key-value pairs. A DynamoDB table consists of items. Each item consists of one partition key and one or more attributes. An example of an item is given below: Example: { "MovieID": 101, "Name 5 min read AWS DynamoDB - Working with Indexes An index is a data structure that enables us to perform fast queries on different columns in a table. After creating an index, the database handles it for us. Whenever data is modified in the table, the index is automatically modified to reflect changes in the table. We can create and use a secondar 2 min read AWS DynamoDB - Working with Items & Attributes AWS DynamoDB is a NoSQL managed database that stores semi-structured data i.e. key-value and document data. It stores data in form of an item. An item consists of attributes. Upon table creation in DynamoDB, it only requires a primary key to differentiate between items and no schema is to be defined 3 min read AWS DynamoDB - Working with Backups Amazon DynamoDB supports on-demand backup and restores features. Those features are available to the user independent of whether the user uses AWS Backup or not. Users can use the DynamoDB on-demand backup capability to create full backups of its tables for a long-term period and archival for regula 3 min read Like