What the DynamoDB Emulator is
A small DynamoDB that runs in your browser. It takes the same request JSON as the DynamoDB API and answers the same way, with the same responses and error messages, so what you learn here works against a real table. Nothing reaches an AWS account: there is no sign-in, no bill and no table to forget to delete. Your tables stay in this browser.
It also shows what DynamoDB keeps out of sight: which partitions a request touched, how many items it read against how many it returned, and the read or write capacity units it used.
How to use it
- Create a table with a partition key and an optional sort key, or add the sample table of orders.
- Add items in the item editor, with any of DynamoDB's attribute types.
- Read them with a Scan or a Query, with a sort key condition and filters, from the table or an index.
- Watch the API call panel. Every action is one DynamoDB request: the panel shows it, its response and what it cost. Change the JSON and send it again to try what the forms do not offer.
Full screen gives the emulator the whole window; Escape brings the page back.
Query and Scan: why one costs more
A Query reads one partition key value: one partition, and only the items with that value, in sort key order. A Scan reads every item of the table, partition after partition. A filter does not make either cheaper: it drops items after they have been read, and you pay for everything read. Run the same filter as a Query and as a Scan on the sample table and compare the items read and the capacity in the panel.
Partitions and capacity units
DynamoDB places each item by a hash of its partition key value. The emulator draws a table as 4 partitions, a model to show the idea rather than how AWS lays out your data, and outlines the ones the last request touched.
Capacity follows DynamoDB's rules: a read unit covers up to 4 KB read with strong consistency, or twice that with eventual consistency, and a write unit covers up to 1 KB written. A write to a table with global secondary indexes also pays for each index whose entry changes.
Global secondary indexes
An index lets you query by other attributes than the table's key. It holds only the items that carry its key attributes, with the attributes its projection names: all of them, the keys only, or the keys and a list you choose. Here a new index is ready at once; on AWS it is built in the background first.
Use it from JavaScript
The emulator can be driven from the browser's JavaScript, for a script, an extension or an AI agent working in the page. window.blowstack.dynamodb.send(operation, request) takes the same request as the API and returns the request, its response or error, and what it touched. The page shows every request a script sends, as it does for the forms.
window.blowstack.dynamodb.send('Query', {
TableName: 'Orders',
KeyConditionExpression: '#c = :c',
ExpressionAttributeNames: {'#c': 'customerId'},
ExpressionAttributeValues: {':c': {S: 'c-1001'}},
ReturnConsumedCapacity: 'TOTAL',
})exportTables() gives all tables and their items as JSON, and importTables(tables) replaces them with such a list, to save a setup or hand it over. operations lists what it answers.
Where it stops
- Operations: CreateTable, DescribeTable, ListTables, UpdateTable, DeleteTable, PutItem, GetItem, UpdateItem, DeleteItem, Query and Scan, with key conditions, filters and update expressions.
- Not yet: projection and condition expressions, transactions, batches, streams, TTL, local secondary indexes and provisioned capacity. A parameter it does not have is refused by name, never ignored.
- A page of results ends at
Limitonly, without DynamoDB's 1 MB limit. - It is for learning, not for running an application: every request walks all the items of the table.