What is AWS DynamoDB?
In this post, we will see how AWS DynamoDB pricing works and what are the different features of DynamoDB.
AWS DynamoDB is a Serverless technology offered by AWS (Amazon Web Services), it is a NoSQL database that is fully managed, scalable to millions of requests and users. It also provides built-in security, backups, and maintenance.
One of the best things about DynamoDB is its ability to scale automatically according to the number of reads and writes by using an On-Demand plan, the rates are also affordable if we compare it with the number of features and speed it gives to the users.
To know more about DynamoDB check out the official page for it.
AWS DynamoDB Pricing
The pricing for AWS DynamoDB depends on the number of reads and writes done to the database, to read and write data into the table it uses something called RCU (Read Capacity Units) and WCU (Write Capacity Units), pricing depends on the number of RCU and WCU used.
There are two types of pricing models available, On-Demand and Provisioned Capacity, let’s see these in detail.
This pricing model provides automatic scaling, in this model we don’t need to define the number of RCU and WCU to use, DynamoDB will automatically add or remove those according to the number of requests coming in.
The user only has to pay for what they use, which means they pay according to the number of RCU and WCU used to handle the incoming requests.
Provisioned Capacity Pricing
This pricing model allows users to set the number of RCU and WCU they want DynamoDB to use so they only pay for the number they set, this approach is best if the user can estimate the number of reads and writes their database is going to get.
Now let’s try to understand how billing gets calculated for reading and writing according to the number of RCU and WCU used.
How Billing Gets Calculated?
As we saw above that read and write operations use RCU and WCU and billing depends on the number of RCU and WCU used, but now we will see how actually AWS calculates what to charge when any RCU or WCU is used.
Billing for read operations is done according to the number of reading units used to read the data from the DynamoDB table, there are three types of reads done on a DynamoDB table, strongly consistent, eventually consistent, and transactional.
1 RCU (Read Capacity Unit) gets used for reading data up to 4KB, data which is more than 4KB requires 2 RCU, eventually consistent reads requires half RCU and transactional reads requires double RCU in comparison to strongly consistent reads.
Billing for write operations are done according to the number of write units used to write the data to the DynampoDB table, there are two types of writes one is standard write and another one is transactional write.
1 WCU is used to write the data up to 1KB, transactional writes require a double number of WCU to write the same size of data.
As of now, AWS is giving storage, RCU, and WCU in a free tier plan, please note that these values can change in the future, but currently we get 25 GB of storage and 25 RCU and WCU to use in a free tier plan.
For more information regarding AWS DynamoDB Pricing, do check out the official page of AWS.
There are many great features that DynamoDB provides, let’s go through some of them in brief.
As we discussed earlier that AWS DynamoDB can be scaled up to millions of requests and database operations, it is capable of scaling automatically and we also get an option to set the limits of scalability according to the database traffic.
We can define the number of RCU and WCU we need and another option is to leave this to DynamoDB itself and it will accommodate these according to the traffic.
To learn more about DynamoDB scaling check out this amazing documentation provided by AWS.
One of the greatest advantages of DynamoDB is that it is fully managed which means users do not have to worry about things like security, backups, software updates, maintenance, etc. It is all managed by AWS, of course, there may be some settings and configurations which are needed to be enabled but they are there for the user to just use without having to set it up from the scratch.
Harmony With Other AWS Services
AWS DynamoDB is in harmony with other AWS services like AWS Lambda, CloudWatch, and much more, for example, there is a great feature in DynamoDB called Streams, which allows users to perform an action like calling a Lambda function whenever there is any change in the database like some kind of insertion or modification.
For logging and monitoring, we have an option to connect DynamoDB with CloudWatch or CloudTrail, so basically there is a great harmony of DynamoDB with other services.
Data Redundency And Availability
DynamoDB provides an option to take On-Demand backups of the databases and that backup will be available for usage in need, there is also a second type of backup which is called point-in-time backup which allows users to not even worry about taking daily/monthly backups because in this type of backup user has an option to restore the database to any point back in time up to last 35 days.
For data redundancy, DynamoDB stores data in partitions, and these partitions are available in multiple availability zones automatically.
Read more here about how DynamoDB backups work.
Overall DynamoDB is a great choice if you are looking for a fully managed database where you don’t have to worry about things like backups and security, etc, in this post we have seen some of the features which are offered by DynamoDB, to know more please make sure to check the official documentation given by AWS.
Check more posts: