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: Get Unique Values
- DynamoDB: Batch Get
- DynamoDB: Get Multiple Items
- DynamoDB: Query Group By
- DynamoDB: Delete All Items With Partition Key
- DynamoDB: Get List Of Items
- DynamoDB Get in Typescript
- DynamoDB: Query Count
- DynamoDB: Query Items
- DynamoDB: Bulk Insert
- DynamoDB: Not Between
- DynamoDB: Like
- DynamoDB: Not Begins With
- DynamoDB: Attribute Not Null
- DynamoDB: Query Global Secondary Index in Nodejs
Spend less time in the AWS console, use Dynobase.
First 7 days are. No credit card needed.
Product Features
DynamoDB Tools
DynamoDB Info
© 2025 Dynobase