Imagine you have a diary where you write your secrets. Why should you protect it?
Choose the best reason why protecting data in a database is important.
Think about privacy and safety of your personal information.
Data protection keeps information safe from people who should not see or change it.
Consider a DynamoDB table storing user passwords without encryption or access control.
What is the most likely outcome if data protection is missing?
Think about what happens if anyone can read sensitive data.
Without protection, attackers can access and steal sensitive data like passwords.
Look at these AWS IAM policy snippets for DynamoDB. Which one correctly allows only read access to a specific table?
Read actions include GetItem and Query.
Only option A allows read actions (GetItem, Query) on the table, restricting other actions.
Which statement best explains how encryption helps protect data stored in DynamoDB?
Think about what encryption does to data when someone tries to read it without permission.
Encryption scrambles data so only authorized users with keys can read it, protecting it from unauthorized access.
Given this DynamoDB access code snippet, what is the main security risk?
const AWS = require('aws-sdk');
const dynamodb = new AWS.DynamoDB.DocumentClient();
async function getUserData(userId) {
const params = {
TableName: 'Users',
Key: { id: userId }
};
return await dynamodb.get(params).promise();
}
// Called with userId from client input without validationThink about what happens if a user sends an ID that is not theirs.
Using user input directly without checking can let users access data they should not see.