Step3: Create a Table in DynamoDB - To store S3 Bucket files metadata information in DynamoDB Table using Lambda Function. Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. With DynamoDB, you can create database tables that can store and retrieve any amount of data and serve any level of request traffic. NoSQL is a term used to describe nonrelational database systems that are highly available, scalable, and optimized for high performance. Instead of the relational model, NoSQL databases (like DynamoDB) use alternate models for data management, such as key-value pairs or document storage.
-
1.
open AWS Management Console
-
2.
To create a Table in DynamoDB, follow the steps: Click "Services"
-
3.
Click "Database"
-
4.
Click "DynamoDB"
-
5.
Click "Tables"
-
6.
Click "Create table"
-
7.
Type Table the Name and click Next to continue. For Ex: **newtable** for this scenario
-
8.
Type partition key name and click Next to continue. For this scenario type **unique**. ### Table details When you create a table, in addition to the table name, you must specify the table's primary key. The primary key uniquely identifies each item in the table. Primary keys can be simple or composite. #### Simple primary key A simple primary key consists of one attribute, known as the partition key. The partition key is part of the table's primary key. In a table that has only a partition key, no two items can have the same partition key value.
-
9.
Select "Default Settings" and and click Next to continue.
-
10.
Click "Create table"
-
11.
Wait for table to be created successfully. Click refresh icon and keep checking whether Staus is Active or not. Once the table status is active, Press Next, and **Click on the Table Name to Open the Table**
-
12.
Click "Explore table items"
-
13.
To add new items (Attributes) to the table, Click "Create item"
-
14.
You can add, remove, or edit the attributes of an item(table). For this Scenario, you must add the following Attributes(columns) in the Table: Click Next and follow the steps to add attributes with some value. ``` unique Bucket Object Size Event EventTime ```
-
15.
Check the Attribute "unique- Partition key" already added and click Next to continue.
-
16.
Click "Value" and Type value as **1**. Click Next to continue.
-
17.
To add new attribute, Click "Add new attribute"
-
18.
Select "String"
-
19.
Remove the existing 'Attribute name (NewValue) and Type Attribute name: **Bucket** in the input box. Click Next to continue.
-
20.
Type Value: **1** and click Next to continue.
-
21.
Click "Add new attribute"
-
22.
Click "String"
-
23.
Remove the existing 'Attribute name (NewValue) and Type Attribute name: **Object** in the input box. Click Next to continue.
-
24.
Type Value: **1** and click Next to continue.
-
25.
Click on "Add New attribute"
-
26.
Click "String"
-
27.
Remove the existing 'Attribute name (NewValue) and Type Attribute name: **Size** in the input box. Click Next to continue.
-
28.
Type Value: **1** and click Next to continue.
-
29.
Click on "Add new attribute"
-
30.
Click "String"
-
31.
Remove the existing 'Attribute name (NewValue) and Type Attribute name: **Event** in the input box. Click Next to continue.
-
32.
Type Value: **1** and click Next to continue.
-
33.
Click on "Add new attribute"
-
34.
Click "String"
-
35.
Remove the existing 'Attribute name (NewValue) and Type Attribute name: **EventTime** in the input box. Click Next to continue.
-
36.
Type Value: **1** and click Next to continue.
-
37.
Now all attributes of the table with value(1) are added. Make sure all names are given correctly and click Next to continue.
-
38.
Click "Create item"
-
39.
Click here to "Expand" and check the table.
-
40.
DynamoDB Table for Lambda function scenario is Successful. Click Close to close the instruction widget. Now you can do the Step4: Create Lambda function ....,