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: Query Greater Than
- DynamoDB: Attribute Not Null
- DynamoDB: Query KeyConditionExpression
- DynamoDB: Get Last Inserted Item
- DynamoDB: Create if Not Exists
- DynamoDB: Delete All Items With Partition Key
- DynamoDB: Delete Table
- DynamoDB: Get All Items
- DynamoDB: Get List Of Items
- DynamoDB: Increment Counter
- DynamoDB: GetItem
- DynamoDB: Delete
- DynamoDB: Query Global Secondary Index in Nodejs
- DynamoDB: Query Group By
- DynamoDB: Get Random Item
Tired of AWS Console? Try Dynobase.
First 7 days are on us. No strings attached.
Product Features
DynamoDB Tools
DynamoDB Info
© 2025 Dynobase