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 scanmethod. 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: Get Unique Values
- DynamoDB: BatchGetItem
- DynamoDB: Get Last 10 Records
- DynamoDB: Create if Not Exists
- DynamoDB: Like
- DynamoDB: Query Global Secondary Index in Nodejs
- DynamoDB: Batch Get
- DynamoDB: Query JSON
- DynamoDB: Query Items
- DynamoDB: Query KeyConditionExpression
- DynamoDB: Query Count
- DynamoDB: Get Multiple Items
- DynamoDB: Get Last Inserted Item
- DynamoDB Get in Typescript
- DynamoDB: Get Random Item
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today
Product Features
DynamoDB Tools
DynamoDB Info
© 2026 Dynobase