dynobase-icon
Dynobase

DynamoDB Get in Typescript (Guide w/ Code Examples)

Rafal Wilinski

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); } });

Login to the AWS Console less. Use Dynobase.

First 7 days are on us. No strings attached.

Product Features

Download
/
Changelog
/
Pricing
/
Member Portal
/
Privacy
/
EULA
/
Twitter
/
Affiliates & Influencers
© 2024 Dynobase
+
Login to the AWS Console less.
Try Dynobase to accelerate your DynamoDB workflow. Start your 7-day free trial today.