Create data in AWS DynamoDBįor inserting data into the AWS DynamoDB table, we will use the class AmazonDynamoDBClient. NET Coreįor accessing DynamoDB programmatically, we can use AWSSDK.DynamoDBv2 NuGet package. But if you add a sort key then the partition key along with the sort key has to be unique.įor this example, I will create a new table user-table, with City as the partition key and Email as the sort key. One thing to remember, if we don’t use the sort key, then the partition key has to be unique across the table. When creating the table, apart from providing the table name, you can provide partition key and sort key as well.īy default, the primary key is the partition key, but we can also add a sort key along with it. When the DynamoDB console appears, in the dashboard, click on the Create Table button to create a new DynamoDB table. In the top search bar, search for DynamoDB, and select it. Using AWS Console, you can create a DynamoDB table easily.
And second, it has support for on-demand backup and restoration of the table. The first one is that there is support for point-in-time recovery for the DynamoDB table. That we can also use apart from the partition key and sort key to supporting faster search of data inside of the table.Īpart from the above-mentioned features, there is a couple of other features that are worth mentioning. And sort key is what used to sort the data inside of the partition.Īpart from the partition key and sort key, we can also create a secondary index on the table. The partition key is what is used to create a partition on the table. DynamoDB supports two types of keys, a partition key and a sort key as primary keys. In terms of keys, there are two main concepts that are very important to understand about DynamoDB. And we can perform features like audit etc with the data. And the lambda function will have the data pre-change as well as post-change. When we configure trigger functionality in a DynamoDB table, it will trigger an AWS Lambda function. The feature is comparable with the traditional RDBMS databases. TriggersĭynamoDB supports triggers capacity using AWS Lambda functions. When we set auto-scaling mode, we scale based on a percentage of load and then scale down and keep a consistent read-write capacity for a normal workload. The auto-scaling feature is more expensive. A workload that can go up and come down using on-demand capacity will auto-scale instantly. So we can either use a read-write capacity mode we can use an autoscale feature. And that’s usually how most of the applications behave the read access is usually 70% on average compare to write capacity.Īlong with that, it provides an auto-scale feature to unpredictable workload as well. We can have more readers and fewer writers to keep the cost minimal. Write capacities are more expensive compare to read capacity. Using Read/Write capacity we can manage the cost of DynamoDB because it charges based on Read/Write capacity. Now let’s talk about few important concepts of DynamoDB. And because of that, it supports an extremely flexible schema. Fifthly, DynamoDB can support ACID transactions.Īnother very important thing to mention about DynamoDB is that it uses key-value and document data models.Fourthly, it can support more than 10 trillion requests per day and up to 20 million requests per second.Thirdly, DynamoDB supports in-memory cache for highly scalable applications.Secondly, it fully managed and can be set up to support multi-region active-active mode.
Firstly, DynamoDB is an extremely fast serverless NoSQL database.And finally, I am going to access the table using.Thirdly, I am going to create a DynamoDB table using the AWS Console.