DynamoDB - with AWS SDK
What is wrong with the following code snippet that tries to put an item into DynamoDB?
import { DynamoDBClient, PutItemCommand } from '@aws-sdk/client-dynamodb';
const client = new DynamoDBClient({ region: 'us-east-1' });
async function putItem() {
const command = new PutItemCommand({
TableName: 'Users',
Item: { UserId: '123', Name: 'Alice' }
});
await client.send(command);
}
putItem();