Skip to main content
This hands-on guide demonstrates how to create and use an Amazon DynamoDB table from the AWS Management Console using a simple e-commerce example: storing customer orders. You will create a table, insert items, run queries, inspect monitoring, and finally delete the table to avoid charges. Key concepts covered:
  • Table creation and primary key design
  • Capacity modes and auto scaling
  • Adding and querying items (Console + PartiQL)
  • Monitoring, backups/replication, and cleanup

Step 1 — Create the table and choose a primary key

Open the DynamoDB service in the AWS Console and create a new table named orders. The most important design decision is choosing the primary key. This controls how efficiently you can retrieve items. For this demo:
  • Partition key: customerId (String) — use this to fetch all orders for a specific customer.
  • Sort key: orderId (String) — ensures each order for a given customer is unique and enables range queries.
A screenshot of the AWS DynamoDB "Create table" console. The form shows a table named "orders" with partition key "customerId" and optional sort key "orderId," both set as strings.
Primary key tips:
  • Use a single partition key when every item is unique (e.g., profile records).
  • Use a composite key (partition + sort) when multiple related items share the same partition (e.g., orders for a customer).
  • Design keys based on access patterns — table design is driven by how you will query the data.

Capacity mode, table class, and advanced options

You can accept defaults or click Customize to review:
  • Table class: Standard or Standard-Infrequent Access (for less frequently accessed data).
  • Capacity mode: On-demand (pay-per-request) or Provisioned (pre-allocated RCUs/WCUs).
  • Encryption at rest and deletion protection.
If you choose Provisioned capacity, you can enable auto scaling for read and/or write capacity. Auto scaling requires a minimum, maximum, and a target utilization percentage (commonly ~70%).
A screenshot of the AWS DynamoDB "Read/write capacity settings" console with Capacity mode set to Provisioned. Read auto-scaling is On (min 1, max 10, target 70%) and write auto-scaling is Off with provisioned write capacity 5.
You can review estimated monthly cost and encryption settings before creating the table.
A screenshot of the AWS DynamoDB console showing "Estimated read/write capacity cost" (Total read and write capacity units: 5 each, estimated $2.91/month). Below it are "Encryption at rest" options (selected: Owned by Amazon DynamoDB) and a panel about deletion protection.
Create the table. It will take a few seconds to become Active. Once active, open the table to inspect configuration and metrics.
A screenshot of the AWS DynamoDB console showing the "orders" table overview. It displays general information (partition key customerId, sort key orderId), table status (Active), and items/metrics panels.
The overview displays:
  • Primary key schema (customerId, orderId)
  • Table status (Active)
  • Item count, table size, average item size
  • Capacity metrics and summary information

Indexes, monitoring, and replication

To support additional access patterns, create Global Secondary Indexes (GSIs) or Local Secondary Indexes (LSIs) from the Indexes tab.
A screenshot of the AWS DynamoDB console displaying the "orders" table on the Indexes tab. The Global secondary indexes section shows no indexes and offers a "Create index" option.
Monitoring integrates with CloudWatch and shows graphs for reads/writes, throttling, latency, and alarms. The Monitor tab provides the live metrics you need to tune capacity or investigate performance.
A screenshot of the AWS DynamoDB console showing the monitoring dashboard for a table named "orders," with multiple graphs for read/write usage, throttled requests/events, and latency. The left sidebar shows DynamoDB menu options like Tables, Backups, and Exports to S3.
Global table replicas appear under Global tables, and Exports & Streams offers backups, export-to-S3, and DynamoDB Streams / Kinesis integration.
A screenshot of the AWS DynamoDB console focused on an "orders" table with the Global tables tab open, showing "No replicas" and buttons to create or delete replicas. The left sidebar shows navigation items like Dashboard, Tables, Backups and DAX.
A screenshot of the AWS DynamoDB console open to the "orders" table on the Exports and streams tab, showing no exports and buttons for "Export to S3" and to turn on Kinesis/DynamoDB streams. The left sidebar shows DynamoDB navigation items like Tables, Backups, Exports/Imports, and the selected table "orders."

Step 2 — Insert sample items via the Console

Open Explore table items to run Scans or Queries and to inspect item data. For production use prefer the AWS SDK or AWS CLI, but the Console is useful for quick tests.
A screenshot of the AWS DynamoDB console showing the "orders" table in the Explore items view with a Scan selected and no items returned. A green banner notes the scan completed and consumed 0.5 read capacity units.
Click Create item and provide values for the partition and sort keys. Make sure numeric attributes are typed as Number and booleans as Boolean in the Console. Example items for this demo (JSON representation):
The image shows the AWS DynamoDB "Create item" form for an orders table with fields like customerId "CUST-1", orderId "ORDER-10", price "100", and a delivered boolean set to True. Buttons to add/remove attributes and a "Create item" button are also visible.
After creating items, use Query operations to fetch items efficiently. Queries require the partition key value. For example, to retrieve all orders for CUST-1 use:
  • customerId = "CUST-1"
Queries can also use a KeyConditionExpression on the sort key (e.g., range queries on orderId) or a FilterExpression for non-key attributes (e.g., price > 60). Important: filter expressions are applied after the read and do not reduce the read capacity units consumed by the underlying query. Example (Console):
  • Query partition key customerId = "CUST-1"
  • Add FilterExpression: price > 60 Result: both items for CUST-1 are read, but only the item with price = 100 is returned.
You can edit items (Edit item → Save) or delete items (select → Delete item) directly from the Console.

PartiQL: a SQL-like option

DynamoDB supports PartiQL — a SQL-compatible language that maps to DynamoDB operations. PartiQL is useful for users familiar with SQL, but the same DynamoDB access patterns and limits still apply.
The screenshot shows the AWS DynamoDB console open to the PartiQL editor, with a left navigation pane and a blank query editor. The Tables panel lists a table named "orders" and the query area shows no results.
Useful PartiQL examples:
  • Select all orders for a customer:
    • SELECT * FROM "orders" WHERE "customerId" = 'CUST-1'
  • Filter by price (note: this still maps to DynamoDB reads/filters):
    • SELECT * FROM "orders" WHERE "customerId" = 'CUST-1' AND "price" > 60

Step 3 — Monitor, then delete the table

After running reads/writes, check the Monitor tab to view actual read/write metrics, throttles, and latency trends. When you finish the demo, delete the table to avoid ongoing charges:
  • Select the table → Delete → confirm.
A screenshot of the AWS DynamoDB console showing the "orders" table in the table list with status "Deleting" and a green banner confirming the delete request was submitted successfully.
Deleting a table is irreversible and removes all data. Consider enabling deletion protection or creating a backup if you need to retain data before deletion.

Quick reference table

Additional resources

Key takeaways:
  • Choose a primary key that matches your read/write access patterns (partition key for customer queries; add a sort key for multiple items per customer).
  • Prefer Query over Scan to reduce costs and improve performance.
  • Choose capacity mode based on traffic predictability; use Provisioned mode with auto scaling for predictable workloads.
  • PartiQL offers SQL-like convenience but maps to the same DynamoDB operations and limits.
That concludes this step-by-step DynamoDB Console demo.

Watch Video