0
0
DynamoDBquery~20 mins

Why data protection is essential in DynamoDB - Challenge Your Understanding

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Data Protection Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Why is data protection critical in databases?

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.

ATo make the database run faster
BTo prevent unauthorized people from reading or changing the data
CTo allow everyone to access the data easily
DTo reduce the size of the database
Attempts:
2 left
💡 Hint

Think about privacy and safety of your personal information.

query_result
intermediate
2:00remaining
What happens if data is not protected in DynamoDB?

Consider a DynamoDB table storing user passwords without encryption or access control.

What is the most likely outcome if data protection is missing?

APasswords can be stolen by attackers
BThe database will automatically delete passwords
CPasswords will be hidden from all users
DThe database will run slower
Attempts:
2 left
💡 Hint

Think about what happens if anyone can read sensitive data.

📝 Syntax
advanced
3:00remaining
Which DynamoDB policy snippet correctly restricts read access?

Look at these AWS IAM policy snippets for DynamoDB. Which one correctly allows only read access to a specific table?

A{ "Effect": "Allow", "Action": ["dynamodb:GetItem", "dynamodb:Query"], "Resource": "arn:aws:dynamodb:region:account-id:table/MyTable" }
B{ "Effect": "Allow", "Action": ["dynamodb:PutItem"], "Resource": "arn:aws:dynamodb:region:account-id:table/MyTable" }
C{ "Effect": "Deny", "Action": ["dynamodb:GetItem"], "Resource": "arn:aws:dynamodb:region:account-id:table/MyTable" }
D{ "Effect": "Allow", "Action": ["dynamodb:DeleteItem"], "Resource": "arn:aws:dynamodb:region:account-id:table/MyTable" }
Attempts:
2 left
💡 Hint

Read actions include GetItem and Query.

optimization
advanced
2:00remaining
How does encryption improve data protection in DynamoDB?

Which statement best explains how encryption helps protect data stored in DynamoDB?

AEncryption automatically backs up the data
BEncryption speeds up data retrieval from the database
CEncryption makes data unreadable to unauthorized users even if they access the storage
DEncryption allows anyone to read data without a password
Attempts:
2 left
💡 Hint

Think about what encryption does to data when someone tries to read it without permission.

🔧 Debug
expert
3:00remaining
Identify the security flaw in this DynamoDB access example

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 validation
AThe function does not encrypt the data before returning
BThe code uses DocumentClient which is insecure
CThe TableName is hardcoded which causes errors
DUser input is used directly without validation, risking unauthorized data access
Attempts:
2 left
💡 Hint

Think about what happens if a user sends an ID that is not theirs.