Two global secondary indexes
Each write is charged three times, not once
item size: 6 reads per second: 100 writes per second: 50 indexes: 2
Capacity units only, with no prices, because prices differ per region and go stale in a page like this. The arithmetic is what people get wrong anyway.
Or drop a file anywhere on this panel. Nothing is uploaded: the analysis runs in this tab.
The answer appears here
Paste on the left and press Calculate. Nothing leaves this tab.
Nothing else to flag.
No formatting problems, and nothing the rules object to. Worth remembering what that covers: this reads the file you pasted, not the account or cluster it will be applied to.
No finding matches that filter.
Real input you can load into the tool above. Each one shows a different thing going wrong, because that is what the tool is for.
Each write is charged three times, not once
item size: 6 reads per second: 100 writes per second: 50 indexes: 2
Throttles at 1,000 write units however much the table has
item size: 1 writes per second: 2000
Charged for the whole table, however few items come back
item size: 2 reads per second: 10 scan with a filter expression
These are the ones that fail silently. The config is accepted, nothing raises an error, and the consequence arrives later.
Each global secondary index is charged as an extra write, so three indexes make every write cost four times what the table alone suggests.
Instead:Multiply by the number of indexes plus one, and project only the attributes each index needs.
Capacity is spread across partitions by partition key, and one partition serves at most 3,000 read units and 1,000 write units.
Instead:Check that the partition key spreads the load. A sequential key such as a timestamp sends everything to one partition.
The filter runs after the read, so you are charged for every item in the table.
Instead:Design a key or an index that supports a Query.
A 6 KB item written to a table with three global secondary indexes costs 24 write units, not 6. This is the usual reason a table's bill is several times what the write rate suggests.
Even when the attribute that changed is not one the index is queried on. Projecting only what each index needs is the single largest lever on a write-heavy table.
If a global secondary index runs out of write capacity, the back pressure reaches the base table and writes start failing there. The error names the table, so the index is the last place anybody looks.
A 4.1 KB item costs the same to read as an 8 KB one. Attribute names count toward the item size, so shortening them is one of the few optimisations that is purely arithmetic.
GetItem, Query and Scan are all eventually consistent unless ConsistentRead is set. A global secondary index cannot be read strongly consistently at all, which is occasionally the reason a design has to change.
However much the table is provisioned. If the traffic concentrates on one partition key it throttles there, and the error is a plain ProvisionedThroughputExceededException that says nothing about partitions. Writes cap at 1,000, which a timestamp partition key hits by construction.
DynamoDB reads the whole table, charges for every item, then applies the filter. A Scan that returns three items can consume the capacity of the entire table, which makes it a table design problem rather than a query problem.