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 Last 10 Records
- DynamoDB: Attribute Not Null
- DynamoDB: Query Date Range
- DynamoDB: Not Begins With
- DynamoDB: Query KeyConditionExpression
- DynamoDB: Get By ID
- DynamoDB: Query Group By
- DynamoDB: Query JSON
- DynamoDB BatchWriteItem in Typescript
- DynamoDB: Get Multiple Items
- DynamoDB: Get Random Item
- DynamoDB: GetItem
- DynamoDB: Increment Counter
- DynamoDB: BatchGetItem
- DynamoDB: Get Unique Values
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today
Product Features
DynamoDB Tools
DynamoDB Info
© 2026 Dynobase