
Cloud
Learning Level
Amazon DynamoDB is a serverless, fully managed NoSQL database for any scale of data.
By the end of this lesson, you'll understand:
# Create table
aws dynamodb create-table \
--table-name Users \
--attribute-definitions AttributeName=userId,AttributeType=S \
--key-schema AttributeName=userId,KeyType=HASH \
--billing-mode PAY_PER_REQUESTJavaScript:
const AWS = require('aws-sdk');
const dynamodb = new AWS.DynamoDB.DocumentClient();
// Create
await dynamodb.put({
TableName: 'Users',
Item: {
userId: 'user123',
name: 'Alice',
email: 'alice@example.com'
}
}).promise();
// Read
const result = await dynamodb.get({
TableName: 'Users',
Key: { userId: 'user123' }
}).promise();
// Update
await dynamodb.update({
TableName: 'Users',
Key: { userId: 'user123' },
UpdateExpression: 'SET email = :email',
ExpressionAttributeValues: { ':email': 'newemail@example.com' }
}).promise();
// Delete
await dynamodb.delete({
TableName: 'Users',
Key: { userId: 'user123' }
}).promise();// Query by partition key
const result = await dynamodb.query({
TableName: 'Users',
KeyConditionExpression: 'userId = :id',
ExpressionAttributeValues: { ':id': 'user123' }
}).promise();Learn about ElastiCache for caching, or explore AWS Monitoring.
Resources
Ojasa Mirai
Master AI-powered development skills through structured learning, real projects, and verified credentials. Whether you're upskilling your team or launching your career, we deliver the skills companies actually need.
Learn Deep • Build Real • Verify Skills • Launch Forward