DynamoDB Get in Typescript (Guide w/ Code Examples)

Provided by Rafal Wilinski
To get an item from a DynamoDB table using TypeScript, you can use the DocumentClient class from the aws-sdk package.
import * as AWS from 'aws-sdk'; const dynamoDb = new AWS.DynamoDB.DocumentClient(); const params = { TableName: 'my-table', Key: { primaryKey: 'some-value', }, }; dynamoDb.get(params, (error, data) => { if (error) { console.error(error); } else { console.log(data.Item); } });
Similar Code Examples
- DynamoDB: Get Unique Values
- DynamoDB: Query JSON
- DynamoDB: Attribute Not Null
- DynamoDB: Get Random Item
- DynamoDB BatchWriteItem in Typescript
- DynamoDB: Get Multiple Items
- DynamoDB: Delete Multiple Items in Javascript
- DynamoDB: Query Items
- DynamoDB: Query Greater Than
- DynamoDB: Create if Not Exists
- DynamoDB: Query Count
- DynamoDB: Batch Get
- DynamoDB: Get Last 10 Records
- DynamoDB: Query Global Secondary Index in Nodejs
- DynamoDB: Get All Items
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today
Product Features
DynamoDB Tools
DynamoDB Info
© 2026 Dynobase