DynamoDB - with AWS SDK
Given the following code snippet, what will be logged if the item exists in the DynamoDB table?
import { DynamoDBClient, GetItemCommand } from '@aws-sdk/client-dynamodb';
const client = new DynamoDBClient({ region: 'us-east-1' });
async function getItem() {
const command = new GetItemCommand({
TableName: 'Users',
Key: { 'UserId': { S: '123' } }
});
const response = await client.send(command);
console.log(response.Item);
}
getItem();