0
0
AWScloud~20 mins

Tables, items, and attributes in AWS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
πŸŽ–οΈ
DynamoDB Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding DynamoDB Table Keys

In AWS DynamoDB, what is the primary difference between a partition key and a sort key in a table?

APartition key determines the partition for each item, while sort key allows multiple items with the same partition key but different sort keys.
BSort key uniquely identifies each item, while partition key allows multiple items with the same sort key but different partition keys.
CPartition key and sort key both must be unique across the entire table.
DPartition key is optional, but sort key is mandatory for all tables.
Attempts:
2 left
πŸ’‘ Hint

Think about how DynamoDB organizes data to allow efficient queries.

❓ Configuration
intermediate
2:00remaining
DynamoDB Item Attribute Types

Which of the following JSON representations correctly defines a DynamoDB item with a string attribute 'Name' and a number attribute 'Age'?

A{"Name": "Alice", "Age": 30}
B{"Name": {"SS": ["Alice"]}, "Age": {"NS": ["30"]}}
C{"Name": {"N": "Alice"}, "Age": {"S": "30"}}
D{"Name": {"S": "Alice"}, "Age": {"N": "30"}}
Attempts:
2 left
πŸ’‘ Hint

DynamoDB expects attribute values to be typed explicitly in JSON format.

❓ Architecture
advanced
2:30remaining
Designing a DynamoDB Table for High Write Throughput

You need to design a DynamoDB table to handle very high write throughput evenly distributed across partitions. Which table key design helps avoid hot partitions?

AUse only a sort key without a partition key.
BUse a partition key with sequential numeric values.
CUse a composite key with a high-cardinality partition key and a sort key.
DUse a simple partition key with low cardinality values.
Attempts:
2 left
πŸ’‘ Hint

Think about how DynamoDB partitions data and distributes load.

❓ security
advanced
2:30remaining
Controlling Access to Specific Attributes in DynamoDB

How can you restrict a user’s access to only certain attributes of items in a DynamoDB table?

AUse IAM policies with condition keys to allow access only to specific attributes.
BCreate a separate table with only the allowed attributes and give access to that table.
CUse DynamoDB Streams to filter attributes before access.
DEncrypt the attributes you want to restrict.
Attempts:
2 left
πŸ’‘ Hint

Consider AWS IAM fine-grained access control features.

❓ service_behavior
expert
3:00remaining
DynamoDB Consistency Model Impact on Reads

If you perform a strongly consistent read on a DynamoDB table immediately after writing an item, what is the expected behavior?

AThe read may return stale data due to eventual consistency.
BThe read always returns the latest written data.
CThe read will fail if the write is not yet fully replicated.
DThe read returns data only if the item has a sort key.
Attempts:
2 left
πŸ’‘ Hint

Think about the difference between eventually consistent and strongly consistent reads.