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: Batch Get
- DynamoDB: Like
- DynamoDB: Delete
- DynamoDB: Get Unique Values
- DynamoDB: Query Greater Than
- DynamoDB: Increment Counter
- DynamoDB: Delete Multiple Items in Javascript
- DynamoDB: Attribute Not Null
- DynamoDB: Delete All Items With Partition Key
- DynamoDB: Bulk Insert
- DynamoDB: BatchGetItem
- DynamoDB: Get Last Inserted Item
- DynamoDB: Get List Of Items
- DynamoDB: Not Begins With
- DynamoDB: Get Random Item
Spend less time in the AWS console, use Dynobase.
Start your 7-day free trial today
Product Features
DynamoDB Tools
DynamoDB Info
© 2025 Dynobase