How to Create DynamoDB database on Amazon Web Service(AWS).
DynamoDB is an Amazon Web Services database system that supports data structures and key-valued cloud services. It allows users the benefit of auto-scaling, in-memory caching, backup and restore options for all their internet-scale applications using DynamoDB.
DynamoDB is the Serverless NoSQL Database offering by AWS. Being Serverless makes it easier to consider DynamoDB for Serverless Microservices since it goes inline with the patterns and practices when designing serverless architectures in AWS.
- Login to aws portal.
- Click on Services.
- Click on DynamoDB.
- Click on Create Table.
- Provide Table name.
- Provide Primary Key.The primary key uniquely identifies each item in the table, so that no two items can have the same key. DynamoDB supports primary keys.
- We can select table setting default or provide the table setting.
- Add the secondary index.
- Click on Add index.
- Provide the Partition Key & Index name.
- Click on Add index.
- Select Read/Write capacity mode.
- Provide Auto Scaling Details.
- We can encrypt the DynamoDB using KMS.
- Click on Add tags.
- Provide the key name & value for DynamoDB.
- Click on Create.
- After sometime DynamoDB is ready.
Create DynamoDB using Shell
- Setup aws-cli on your system so click on link https://www.hackerxone.com/blog/how-install-configure-aws-cli-ubuntu-1804
- Run the following command:
aws dynamodb create-table –table-name table-name –attribute-definitions AttributeName=attribute-name,AttributeType=attribute-type –key-schema AttributeName=attribute-name,KeyType=HASH AttributeName=attribute-name,KeyType=RANGE –provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 –tags Key=tag-name,Value=tag-value