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: Bulk Insert
- DynamoDB: Not Begins With
- DynamoDB Get in Typescript
- DynamoDB: Get By ID
- DynamoDB BatchWriteItem in Typescript
- DynamoDB: Increment Counter
- DynamoDB: Query Greater Than
- DynamoDB: BatchGetItem
- DynamoDB: Query KeyConditionExpression
- DynamoDB: Query JSON
- DynamoDB: Create if Not Exists
- DynamoDB: Delete All Items With Partition Key
- DynamoDB: Get Unique Values
- DynamoDB: Delete Table
- DynamoDB: Get Last Inserted Item
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today
Product Features
DynamoDB Tools
DynamoDB Info
© 2026 Dynobase