DynamoDB: Get All Items (Guide w/ Code Examples)

Provided by Rafal Wilinski
To retrieve all items from a DynamoDB table using the JavaScript SDK, you can use the scan
method. The scan
method retrieves all items from the table. So it should be used with caution on large tables. Also, you can use the scan
method with filterExpression
to filter the items you want.
const AWS = require("aws-sdk"); const dynamoDB = new AWS.DynamoDB(); const params = { TableName: "myTable" }; dynamoDB.scan(params, (err, data) => { if (err) { console.error("Unable to scan the table. Error JSON:", JSON.stringify(err, null, 2)); } else { console.log("Scan succeeded."); data.Items.forEach((item) => { console.log("Item :", JSON.stringify(item)); }); } });
Similar Code Examples
- DynamoDB: Not Between
- DynamoDB: Get Unique Values
- DynamoDB: Query Items
- DynamoDB: Like
- DynamoDB: Not Begins With
- DynamoDB: Get By ID
- DynamoDB: Query Count
- DynamoDB: Increment Counter
- DynamoDB: Create if Not Exists
- DynamoDB: Delete
- DynamoDB: Bulk Insert
- DynamoDB: Query JSON
- DynamoDB: Get List Of Items
- DynamoDB: Delete Table
- DynamoDB: Delete Multiple Items in Javascript
Tired of AWS Console? Try Dynobase.
First 7 days are. No credit card needed.
Product Features
DynamoDB Tools
DynamoDB Info
© 2025 Dynobase