Choose pricing model
On-Demand
Pay for WRU (Write Request Units) and RRU (Read Request Units).
Priced $1.25 per million operations and $0.25 per million operations respectively.
For strongly consistent operations:
One WRU = 1 write operation with item size up to 1KB
One RRU = 1 read operation with item size up to 4KB per second
For eventually consistent divide by 2, for transactional multiply by 2
Provisioned Capacity
Pay for provisioned number of RCU (Read Capacity Units) and WCU (Write Capacity Units).
Billed $0.00013 per RCU/h and $0.00065 per WCU/h.
For strongly consistent operations:
One WRU = 1 write operation with item size up to 1KB
One RRU = 1 read operation with item size up to 4KB
For eventually consistent divide by 2, for transactional multiply by 2
In which region is the Table going to be hosted?
How many WCUs (Write Capacity Units) do you want to provision?
($0.006500 per hour)
How many RCUs (Read Capacity Units) do you want to provision?
($0.001300 per hour)
How much data will there be in the table?
GB
($6.25 per month)
How much data (in RRU) will be read from DynamoDB Streams?
Data from DynamoDB Streams is read using GetRecords API call. Each of these calls is billed on RRU basis and returns up to 1MB of data. Stream RRU are independent from Table RRU.
units per month
($0.00 per month)
Includes 25 WCUs and 25 RCUs of provisioned capacity, 25 GB of data storage and 2,500,000 DynamoDB Streams read requests
~0.00 USD per month
Additional charges related to Data Transfer, Backups, DAX and Global Tables might apply depending on usage.
Don't know how many WCUs and RCUs get consumed by your item(s)? Use our DynamoDB Item Size Calculator
DynamoDB Cost Optimization - Best Practices
Because Amazon DynamoDB is a fully managed database where a user does not provision any machines, the pricing is not as straight forward. While the tool above can help with forecasting the costs, the pricing optimization techniques are a bit different. Below are 10 tips that can help you lower your DynamoDB costs:
1. Use cheaper regions
If you are not concerned about your data's location because you don't need to meet any regulations or compliance standards, you can provision your tables in regions where it's cheaper. For example, if your table will have 100GB of data, the storage will cost $28.50 per month in Tokyo (ap-northeast-1), $29.72 per month in London (eu-west-2), or even $37.50 per month in Sao Paulo (sa-east-1).
The cheapest regions are us-east-1, us-east-2 and us-west-2 costing $0.25 per GB/month, $0.00065 per WCU/hour and $0.00013 per RCU/hour.
2. Use shorter attribute names
Because DynamoDB in both On-Demand and Provisioned capacity mode uses size-dependent billing units (1 WCU/WRU = 1KB, 1 RCU/RRU = 4KB), plus, you're paying for storage too, you should always aim to make your records as small as possible. If making attribute values is not an option, try making attribute names shorter. This helps you reduce the amount of storage required for your data. Moreover, when storing dates, you can choose the epoch time format instead of ISO dates because it's shorter too. It also makes your items compatible with DynamoDB's TTL feature.
3. Be aware of huge blobs
Saving images in DynamoDB can quickly skyrocket costs. It's very inefficient, and you should rather store all images or linked assets in S3 and save the URL pointing to it in DDB. If that's not an option, consider using compression algorithms like gzip to make blobs smaller before saving them.
4. Prefer queries over scans
DynamoDB has two ways of fetching a set of records from it: Query and Scan. While the query is using partition and sort key to get the desired piece of data fast and directly, the scan, on the other hand, is "scanning" through your whole table. The difference here is that while in Query, you are charged only for items which are returned, in scan case, you're being charged for all the rows scanned, not the total amount of items returned.
5. Avoid strongly consistent reads and transactions where possible
DynamoDB uses eventually consistent data model. It means that updates are propagated across all storage locations, usually within one second or less. However, DynamoDB supports strongly consistent reads too, but with an additional cost. Strongly consistent reads require a double amount of Read request/capacity units than the eventually consistent reads.
6. When using GSIs, think about Attribute Projections
Attribute Projections specify which attributes are available when querying for data using Global Secondary Index. Sometimes, when accessing the data using GSIs, not all attributes are needed. Reducing the amount of data available in GSIs by using Attribute Projection `KEYS_ONLY` or `INCLUDES` instead of `ALL` will reduce the amount of data kept in GSI significantly thereby lowering not only the costs storage but also consume less read/write units when accessing or updating the data.
7. Use on-demand mode wisely
As Yan Cui demonstrated in his blog post, "rough estimate suggests that on-demand tables are around 5–6 times more expensive per request compared to a provisioned table". Conclusion: if your workload has steady utilization without sudden spikes, consider going with provisioned mode with autoscaling enabled.
8. Use reserved capacity
When using provisioned capacity mode and your capacity is bigger than 100 units, you can also consider purchasing reserved capacity. For a three year term, reserved capacity provides a 76% discount, and for a one year term, reserved capacity provides a 53% discount when compared to provisioned throughput capacity.
9. Remove unnecessary items
To minimize the storage costs, aim to always purge unnecessary data. If your business does not have to keep the events older than X days, you can leverage the TTL functionality.
Moreover, if you have any many-to-many relationships, remember that you need to take care of "orphaned records" on your own. As DynamoDB is not a relational database, it does not have an `ON DELETE CASCADE` feature like many RDBMS.
10. Do not overuse GSIs
DynamoDB automatically copies the right set of attributes to any indices where the attributes must exist. This increases the costs of your storage because of the additional space used. In detail, it is a sum of:
- Byte size of table primary key
- Byte size of index key attribute
- Byte size of projected attributes
- 100 byte-overhead per index item
Frequently Asked Questions
How expensive is DynamoDB?
DynamoDB costs can vary from being completely free to infinite depending on the amount of data you store and amount read/write throughput. Use our DynamoDB Costs Calculator above to estimate the costs of your tables. Keep in mind that you can lower the costs a bit by applying the DynamoDB Free Tier.
What pricing models are available for DynamoDB?
There are two basic pricing models for DynamoDB.
- Provisioned Capacity - billed on an hourly basis per provisioned number of RCU (Read Capacity Units) and WCU (Write Capacity Units) Keep in mind that provisioned capacity supports autoscaling, so the number of capacity units can dynamically adapt to the traffic. Moreover, you can purchase reserved capacity to obtain discounts in exchange for commitment to a certain usage level and upfront payment.
- On-demand - billed on a request basis per WRU (Write Request Units) and RRU (Read Request Units). Truly Serverless offering where you pay only for the requests made. However, DynamoDB on demand pricing tends to be more expensive for production workloads.
More details and differences here
Is there a cost for individual DynamoDB tables?
DynamoDB Tables on its own are totally free. However, you’re billed for:
- Amount of data stored
- Amount of data written and read
- Data transfer
- Backups and restore operations
- DynamoDB Streams
- Replicated write request units when using Global Tables
What is DynamoDB GSI Cost?
Maintaining each Index adds 100 bytes of storage overhead per item, so your storage costs will be increased.
FAQs
How much of DynamoDB is free? ›
For DynamoDB, the free tier provides 25 GB of storage, 25 provisioned write capacity units (WCU), and 25 provisioned read capacity units (RCU). You can use these resources for free for as long as 12 months, and reduce your monthly DynamoDB pricing.
How much does it cost to use DynamoDB? ›DynamoDB Streams are charged at $0.02 per 100,000 read operations. Data requested by requesters outside the AWS region where the DynamoDB table is deployed is charged at $0.09 per GB.
Is DynamoDB cheap? ›Storage — DynamoDB Standard table is priced at $0.25 per GB, which totals in $3,600. We can configure a 30 days TTL per item with no extra charge for the evictions. Write requests — I'll use the provisioned capacity pricing model for this calculation.
Is DynamoDB stream free? ›DynamoDB charges one change data capture unit for each write (up to 1 KB). You pay only for the writes your application performs without having to manage throughput capacity on the table. Kinesis Data Streams charges still apply when you replicate DynamoDB changes to a Kinesis data stream.
Is DynamoDB under free tier? ›Amazon DynamoDB offers a free tier with the following provisions, which is enough to handle up to 200M requests per month: 25 GB of Storage. 25 provisioned Write Capacity Units (WCU) 25 provisioned Read Capacity Units (RCU)
How can the cost of DynamoDB be reduced? ›But for the unused tables with data in them, DynamoDB still charges for storage. The only way to reduce your storage cost, besides the read and write capacity provisioning cost, is to delete the items from the table or to delete the table entirely.
How much does DAX cost? ›DAX Pricing
You pay for each node in the cluster (see the DynamoDB Pricing page for more information) on a per-hour basis, with prices starting at $0.269 per hour in the US East (N. Virginia) and US West (Oregon) regions.
For simple data storage, S3 is the cheapest service. DynamoDB has the better performance, low cost and higher scalability and availability.
Is DynamoDB more expensive than S3? ›And now the big surprise: S3 costs 1514$/month, whereas DynamoDB costs 830$/month using on-demand capacity, but it could drop to 173$/month (+360$ paid upfront) with reserved capacity. In the S3 case, the biggest cost part comes from accessing the service, the storage itself being under 100$/month.
What is cheaper RDS or DynamoDB? ›In my experience - and with my uses cases - I have found that for small to medium sized projects DynamoDb ends up being cheaper, and in some cases even completely free because the use fits within the free-tier that aws offers - which is pretty generous. DynamoDb is my goto for these types of applications.
Is RDS more expensive than Dynamo? ›
Costs. Storing data in DynamoDB can be expensive when compared to other solutions like RDS or Aurora. For example storing 1TB of data in Aurora costs $100/month. By comparison, 1TB in DynamoDB costs $250/month.
Is DynamoDB like MongoDB? ›Both these databases support multi-document transactions, but with key differences: MongoDB supports read and writes to the same documents and fields in a single database transaction. DynamoDB lacks support for multiple operations within a single transaction.
Is DynamoDB a Redis? ›DynamoDB and Redis are fast, robust, and reliable NoSQL databases. They both use the key-value store as the primary database model, and DynamoDB also supports the document model. Redis offers secondary database models like the document store, graph DBMS, and spatial DBMS.
Are DynamoDB scans expensive? ›Should I use DynamoDB Scans? Generally speaking, no. Scans are expensive, slow, and against best practices. In order to fetch one item by key, you should use Get operation, and if you need to fetch a collection of items, you should do that using Query.
Is DynamoDB open source? ›Apache Cassandra is an open-source database, while Amazon DynamoDB is a database service on the list of AWS's offering.
What is the difference between RDS and DynamoDB? ›Amazon RDS will automatically replace the compute instance powering your deployment in the event of a hardware failure. DynamoDB global tables replicate your data automatically across 3 Availability Zones of your choice of AWS Regions and automatically scale capacity to accommodate your workloads.
Is DynamoDB key-value or document? ›DynamoDB is a key-value store with added support for JSON to provide document-like data structures that better match with objects in application code. An item or record cannot exceed 400KB. Compared to MongoDB, DynamoDB has limited support for different data types.
What is AWS free tier? ›The AWS Free Tier provides customers the ability to explore and try out AWS services free of charge up to specified limits for each service. The Free Tier is comprised of three different types of offerings, a 12-month Free Tier, an Always Free offer, and short term trials.
Why DynamoDB is expensive? ›To sum up, poorly chosen partition keys, the wrong capacity mode, and overuse of scans and global secondary indexes are all causes of skyrocketing DynamoDB costs as applications scale.
How does DynamoDB calculate item size? ›The size of a number is approximately (length of attribute name) + (1 byte per two significant digits) + (1 byte). A binary value must be encoded in base64 format before it can be sent to DynamoDB, but the value's raw byte length is used for calculating size.
Can we query DynamoDB without primary key? ›
Hash key in DynamoDB
The primary reason for that complexity is that you cannot query DynamoDB without the hash key. So, it's not allowed to query the entire database. That means you cannot do what you would call a full table scan in other databases.
Amazon DynamoDB Accelerator (DAX) is a fully managed, highly available, in-memory cache for Amazon DynamoDB that delivers up to a 10 times performance improvement—from milliseconds to microseconds—even at millions of requests per second.
Can you use ElastiCache with DynamoDB? ›ElastiCache for the win!
AWS is offering in-memory stores allowing you to cache read requests to DynamoDB and other database systems: ElastiCache.
DynamoDB is not ACID compliant. It only provides the 'C' (consistency) and 'D' (durability) in ACID. Here is an example of how to achieve ACID on top of DynamoDB, but this makes the application architecture very complex.
Which is faster DynamoDB or S3? ›2) Amazon S3 vs DynamoDB: Purpose
For relatively small items, especially those with a size of less than 4 KB, DynamoDB runs individual operations faster than Amazon S3. DynamoDB can scale on-demand, but S3 offers better scalability. In case of huge volumes of traffic, DynamoDB can be overwhelmed for a while.
Long answer: DynamoDB limits individual records to 64 KB, so you probably can't use DynamoDB unless your images are tiny anyway.
Can DynamoDB store PDF? ›AWS DynamoDB has a limit on the row size to be max of 400KB. So, it is not advisable to store the binary content of image/PDF document in a column directly. Instead, you should store the image/PDF in S3 and have the link stored in a column in DynamoDB.
Is DynamoDB a data lake? ›You can also perform a point-in-time initial load of the DynamoDB table into the data lake before setting up DynamoDB Kinesis streams. DynamoDB provides a no-coding required feature to achieve this. For more information, see Export Amazon DynamoDB Table Data to Your Data Lake in Amazon S3, No Code Writing Required.
Is DynamoDB fast? ›Amazon DynamoDB provides high throughput at very low latency. It is also built on Solid State Drives to help optimize for high performance even at high scale.
Can AWS glue write to DynamoDB? ›AWS Glue supports writing data into another AWS account's DynamoDB table.
Is Aurora cheaper than DynamoDB? ›
Data transfer is zero cost for both DynamoDB and Aurora up to 1GB. DynamoDB may be more expensive for a large-scale organization than Aurora, especially if your application has a higher number of query requirements. But for a startup or small organization, DynamoDB would be the best cost-effective solution.
Which is faster RDS or DynamoDB? ›Amazon DynamoDB
It is a great solution for unstructured data as opposed to RDS which is meant for well-structured data but we'll get into all of that below. DynamoDB is a key-value database that is EXTREMELY fast.
The significant difference between these two services is that Amazon RDS is relational, whereas DynamoDB is a NoSQL database engine. In terms of storage size, DynamoDB stands out with its ability to support tables of any size. But with RDS, the storage size changes based on the database engine we use.
Which is faster DynamoDB or Aurora? ›...
Difference between Amazon Aurora and Amazon DynamoDB :
S.No. | Amazon Aurora | Amazon DynamoDB |
---|---|---|
2. | It is MySQL and PostgreSQL compatible cloud service by Amazon. | It is hosted, scalable database service by Amazon with data stored in Amazon cloud. |
Amazon Redshift is a completely managed data warehouse service with a Postgres compatible querying layer. DynamoDB is a NoSQL database offered as a service with a proprietary query language.
Why would you choose an Amazon DynamoDB over other database solutions? ›DynamoDB supports high-traffic, extreme-scaled events and can handle millions of queries per second.
Is DynamoDB cheaper than MongoDB? ›Overall, from the above examples, the cost of DynamoDB is much cheaper than MongoDB. However, if the read and write capacity and/or the item's size are increased, the cost of DynamoDB will be increased. MongoDB Atlas is, on the other hand, the cost stays the same until you scale up the storage needs.
Is DynamoDB faster than MongoDB? ›DynamoDB is lightning fast (faster than MongoDB) so DynamoDB is often used as an alternative to sessions in scalable applications. DynamoDB best practices also suggests that if there are plenty of data which are less being used, move it to other table.
What language is DynamoDB written in? ›DynamoDB has SDKs for these programing languages: Java. JavaScript. .
Is DynamoDB open source? ›Apache Cassandra is an open-source database, while Amazon DynamoDB is a database service on the list of AWS's offering.
Is DynamoDB streams expensive? ›
Amazon Web Services charges DynamoDB Streams pricing at US$ 0.02 per 100,000 read or write requests. The charges for the feature are the same in the On-Demand and Provisioned Capacity modes.
What is AWS free tier? ›The AWS Free Tier provides customers the ability to explore and try out AWS services free of charge up to specified limits for each service. The Free Tier is comprised of three different types of offerings, a 12-month Free Tier, an Always Free offer, and short term trials.
Is the S3 free? ›With Amazon S3, you pay only for what you use. There is no minimum charge. You can estimate your monthly bill using the AWS Pricing Calculator. We charge less where our costs are less.
Is DynamoDB a SQL? ›DynamoDB can manage structured or semistructured data, including JSON documents. SQL is the standard for storing and retrieving data. Relational databases offer a rich set of tools for simplifying the development of database-driven applications, but all of these tools use SQL.
What language is DynamoDB written in? ›DynamoDB has SDKs for these programing languages: Java. JavaScript. .
Is DynamoDB like MongoDB? ›Compared to MongoDB, DynamoDB has limited support for different data types. For example, it supports only one numeric type and does not support dates. As a result, developers must preserve data types on the client, which adds application complexity and reduces data re-use across different applications.
Is DynamoDB a Redis? ›DynamoDB and Redis are fast, robust, and reliable NoSQL databases. They both use the key-value store as the primary database model, and DynamoDB also supports the document model. Redis offers secondary database models like the document store, graph DBMS, and spatial DBMS.
How much does DAX cost? ›DAX Pricing
You pay for each node in the cluster (see the DynamoDB Pricing page for more information) on a per-hour basis, with prices starting at $0.269 per hour in the US East (N. Virginia) and US West (Oregon) regions.
DynamoDB supports two types of read operations: Query and Scan. To find information, a query operation uses either the primary key or the index key. Scan, as the name implies, is a read call that scans the entire table for a specified result. DynamoDB is designed to be query-optimized.
Is AWS free after 12 months? ›AWS Free Tier includes the following free offer types: 12 Months Free – These tier offers include 12 months free usage following your initial sign-up date to AWS. When your 12 month free usage term expires, or if your application use exceeds the tiers, you simply pay standard, pay-as-you-go service rates.
Is AWS free forever? ›
Always Free: These free tier offers do not automatically expire at the end of your 12 month AWS Free Tier term, but are available to both existing and new AWS customers indefinitely.
Why is AWS charging me for free tier? ›When using AWS Free Tier, you might incur charges due to the following reasons: You exceeded the monthly free tier usage limits of one or more services. You're using an AWS service, such as Amazon Aurora, that doesn't offer free tier benefits. Your free tier period expired.
Is S3 cheaper than EBS? ›Amazon S3 is cheapest for data storage alone. However, there are various other pricing parameters in S3, including cost per number of requests made, S3 Analytics, and data transfer out of S3 per gigabyte. EFS has the simplest cost structure.
Is EC2 to S3 free? ›The data transfer between two EC2 in different AZ costs $0.02/GB, but S3 is free to download from any AZ. Consider the scenario where 1 GB data is transferred 20 times from one EC2 server to another in different availability zone. It will cost $0.20/GB (20 * 0.01).
Is Amazon S3 cheap? ›No - amazon s3 is designed to be cheap and durable object storage. You can get even cheaper if you decided to use infrequent access or reduced redundancy storage classes.