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: Like
- DynamoDB: Query Count
- DynamoDB: Query Items
- DynamoDB: BatchGetItem
- DynamoDB: Get Multiple Items
- DynamoDB: Increment Counter
- DynamoDB: Query Group By
- DynamoDB: Bulk Insert
- DynamoDB: Get By ID
- DynamoDB BatchWriteItem in Typescript
- DynamoDB: Get Random Item
- DynamoDB: Batch Get
- DynamoDB: Query Ends With
- DynamoDB: Not Begins With
- DynamoDB: Get Last Inserted Item
Dynobase is a Professional GUI Client for DynamoDB
Try 7-day free trial. No strings attached.
Product Features
DynamoDB Tools
DynamoDB Info
© 2026 Dynobase