DynamoDB Free Tier - Everything You Need To Know
Written by Lahiru Hewawasam
Published on March 9th, 2022
Time to 10x your DynamoDB productivity with Dynobase [learn more]
What is DynamoDB Free Tier?
DynamoDB is a NoSQL database provided by Amazon as a part of the Amazon Web Services portfolio. The service is offered to users for free within the Amazon free tier for limited usage. It is an excellent way for users to test drive the functionalities provided within DynamoDB without paying to evaluate it.
The DynamoDB free tier comes with its limits, and the users must stay within the limits specified. However, AWS does not recommend running production workloads in the free tier as it might quickly go beyond the limits.
Setting up DynamoDB Free Tier
To set up your DynamoDB free tier, you'd require a working free tier subscription to Amazon Web Services. Once you have this in order, you can start the steps mentioned below. You typically don't have to do much to create a new AWS account.
- Sign in to the AWS web console
- Navigate to the DynamoDB service
- Create a new table using the "Create table" button shown on the web console
- Specify the required parameters in the settings while creating the table
DynamoDB Free Tier Limits
On-Demand Free Tier
- 25 GB of data storage for tables using the DynamoDB Standard table class.
- 2.5 million stream read requests from DynamoDB Streams.
- 1 GB of data transfer out, aggregated across AWS services.
Provisioned Free Tier
- 25 WCUs (Write Capacity Units) and 25 RCUs (Read Capacity Units) of provisioned capacity for tables using the DynamoDB Standard table class.
- 25 GB of data storage for tables using the DynamoDB Standard table class.
- 25 rWCUs (Replicated write capacity units) for global tables using the DynamoDB Standard table class deployed in two AWS Regions.
- 2.5 million stream read requests from DynamoDB Streams.
- 1 GB of data transfer out (15 GB for your first 12 months), aggregated across AWS services.
Time Period Limit
DynamoDB free tier offers access to reading and storing data over 12 months or if you exceed the given limits (Read/Write Capacity Units), whichever happens first. Once you exceed these limits, you will need to pay for your usage.
Capacity Limits
The free tier comes with the following capacity restrictions:
- 25GB of database storage
- 25 provisioned write capacity units (WCU)
- 25 provisioned read capacity units (RCU)
DynamoDB Streams
The free tier of DynamoDB will give you 2.5 million stream read requests therefore, you will only be charged after you've used up this allocated amount of read requests.
After exceeding the allocated 2.5 million read requests provided within the free tier, the price calculation is as follows:
AWS charges $0.0000002 per DynamoDB Streams GetRecord API request.
Therefore if you were to utilize 1,000,000 GetRecord API requests per day, your total charge would add up to $6.08.
Pricing Breakdown
1,000,000 per day * (730 hours in a month / 24 hours in a day) = 30,416,666.6667 per month
Pricing Calculations:
30,416,666.6667 GetRecord API requests x $0.0000002 = $6.0833
Pricing Example with DynamoDB Free Tier
Taking the following example, we can understand how the monthly charges for DynamoDB will behave depending on the usage on a provisioned capacity mode with auto-scaling enabled for the table.
Suppose that you create a new DynamoDB standard table in the US East Region with target utilization set to the default value of 70 percent; minimum capacity units at 100 RCUs and 100 WCUs, the maximum capacity set to 400 RCUs and 400 WCUs. Assume that each time a user interacts with your application, the resources utilized are one write of 1 KB and one strongly consistent read of 1 KB.
For the first ten days of the month, assume that the consumed RCUs and WCUs vary between 1 and 70. Then, since the RCUs and WCUs stay within limits set, auto-scaling is not triggered, and your bill per hour is $0.078:
- 100 WCUs: $0.065 [$0.00065 * 100]
- 100 RCUs: $0.013 [$0.00013 * 100]
- Per Hour: $0.078 [$0.065 + $0.013]
On day 11, the consumed capacity increases to 100 RCUs and 100 WCUs. Since the limits exceed, auto-scaling is triggered to increase the provisioned capacity to 143 WCUs and 143 RCUS (100 consumed ÷ 143 provisioned = 69.9 percent), and your bill per hour increases to $0.11109:
- 143 WCUs: $0.01859
- 143 RCUs: $0.0925
- Per Hour: $0.11109 [$0.01859 + $0.0925]
Now assume that on day 21, the consumed capacity decreases to 80 RCUs, and 80 WCUs. Auto-scaling starts triggering scale-down activities to reduce provisioned capacity to 114 WCUs and 114 RCUs (80 consumed ÷ 114 provisioned = 70.2 percent), and your bill per hour is $0.08952:
- 114 WCUs: $0.01482
- 114 RCUs: $0.01482
- Per Hour: $0.08952 [$0.01482 + $0.01482]
Your bill for the month is: $66.86
- Days 1 – 10: $18.72 ($0.078 per hour x 24 hours x 10 days)
- Days 11 – 20: $26.66 ($0.11109 per hour x 24 hours x 10 days)
- Days 21 – 30: $21.48 ($0.08952 per hour x 24 hours x 10 days)
The AWS Free Tier includes 25 WCUs and 25 RCUs for tables using the DynamoDB Standard table class, reducing your monthly bill by $14.04.
25 WCU x $0.00065 per hour x 24 hours x 30 days = $11.70
25 RCU x $0.00013 per hour x 24 hours x 30 days = $2.34
You can use the DynamoDB pricing calculator to create an estimate for your custom workloads.
Best Practices for Using DynamoDB Free Tier
To make the most out of the DynamoDB free tier, consider the following best practices:
- Monitor Usage: Regularly monitor your usage to ensure you stay within the free tier limits. AWS provides tools like CloudWatch to help you track your consumption.
- Optimize Data Models: Design your data models efficiently to minimize the number of read and write operations. This can help you stay within the free tier limits longer.
- Use On-Demand Mode for Development: If you're in the development phase, consider using the on-demand mode to avoid over-provisioning resources.
- Leverage Global Tables Wisely: If you need multi-region replication, use global tables but be mindful of the additional costs that can incur once you exceed the free tier limits.
- Automate Scaling: Use auto-scaling to adjust your capacity based on actual usage, which can help you manage costs effectively.
Conclusion
In this article, I've covered everything you need to know before starting out with your free DynamoDB subscription - I hope you have found this helpful. Thank you for reading!
Frequently Asked Questions
Does DynamoDB have a free tier?
Yes, DynamoDB has a free tier available via the AWS free tier subscription. This subscription will last 12 months or until you exceed the limits of the free tier, after which you would switch from the free tier to a pay-as-you-go service rate.
Is DynamoDB free tier enough?
With the free tier, DynamoDB can handle up to 200M requests per month. This limit is undoubtedly enough to get hands-on experience with the solution. However, it might not be enough to run production workloads.
I could not understand some of the DynamoDB-specific concepts mentioned in this guide - what should I do?
We recommend you look at our DynamoDB tutorials page, which links to tutorials and articles we've created that will take you from a beginner to becoming a DynamoDB expert.