DynamoDB: GetItem (Guide w/ Code Examples)

Provided by Rafal Wilinski
The AWS SDK for JavaScript provides a getItem
method for retrieving an item from a DynamoDB table.
const AWS = require('aws-sdk'); const dynamodb = new AWS.DynamoDB({region: 'us-west-2', apiVersion: '2012-08-10'}); const params = { TableName: 'MyTable', Key: { 'PrimaryKey': {S: 'some-value'}, 'SortKey': {N: '123'}, }, }; dynamodb.getItem(params, function(err, data) { if (err) { console.log(err); } else { console.log(data); } });
Similar Code Examples
- DynamoDB: Query JSON
- DynamoDB: Not Begins With
- DynamoDB: Get By ID
- DynamoDB: Query Group By
- DynamoDB: Get Table
- DynamoDB: Query KeyConditionExpression
- DynamoDB: BatchGetItem
- DynamoDB: Get Random Item
- DynamoDB: Get Last 10 Records
- DynamoDB: Get Unique Values
- DynamoDB: Delete Multiple Items in Javascript
- DynamoDB: Create if Not Exists
- DynamoDB: Get Multiple Items
- DynamoDB Get in Typescript
- DynamoDB: Query Greater Than
Login to the AWS Console less. Use Dynobase.
First 7 days are. No credit card needed.
Product Features
DynamoDB Tools
DynamoDB Info
© 2025 Dynobase