AWS DynamoDB Flashcards

(28 cards)

1
Q

What type of database is DynamoDB?

A

DynamoDB is a fully managed NoSQL database service that supports key-value and document data models.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the main data structures used in DynamoDB?

A

Tables
Items (rows)
Attributes (columns).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the primary keys in DynamoDB?

A

Partition key (hash key)
Partition key + Sort key (composite key).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the maximum size of an item in DynamoDB?

A

400 KB per item.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What read/write capacity modes does DynamoDB support?

A

Provisioned mode: Pre-defined read/write capacity units (RCUs/WCUs)
On-demand mode: Auto-scales based on traffic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the consistency options for reads in DynamoDB?

A

Eventually consistent reads (default)
Strongly consistent reads

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How are read capacity units (RCUs) calculated?

A

Eventually consistent read: 1 RCU = 8 KB per second.
Strongly consistent read: 1 RCU = 4 KB per second.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How are write capacity units (WCUs) calculated?

A

1 WCU = 1 write per second for an item up to 1 KB

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What types of indexes does DynamoDB support?

A

Primary index: partition key or composite key

Secondary indexes:
Global Secondary Index (GSI): any attribute, across partitions
Local Secondary Index (LSI): same partition key, different sort key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Can you change a primary key after table creation?

A

No, you cannot change the primary key.
You must create a new table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is DynamoDB Streams?

A

A time-ordered sequence of item-level changes in a table.
Used for replication, triggers, and analytics.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is DynamoDB TTL (Time to Live)?

A

TTL automatically deletes expired items based on a timestamp attribute.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the maximum table size for DynamoDB?

A

DynamoDB tables scale virtually without limit.
You don’t manage partitions manually.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How is high availability achieved in DynamoDB?

A

Through multi-AZ replication within a region
For cross-region, use Global Tables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are DynamoDB Global Tables?

A

Fully managed, multi-region, multi-master tables for global applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Can DynamoDB Global Tables automatically handle conflict resolution?

A

Yes, using last-writer-wins (timestamp-based) conflict resolution.

17
Q

How do you design a DynamoDB table for high throughput?

A

Use evenly distributed partition keys
Avoid hot partitions
Use GSIs/LSIs carefully to optimize queries

18
Q

How do you efficiently query large datasets?

A

Use Query instead of Scan wherever possible.
Use pagination for large results.

19
Q

What is Pagination in DynamoDB ?

A

Pagination is the process of retrieving large results sets in multiple smaller chunks (pages) instead of all at once.

20
Q

How do you handle unpredictable traffic spikes?

A

Use on-demand capacity mode or DAX caching

21
Q

How can you secure DynamoDB data?

A

IAM policies for table access
Encryption at rest using AWS KMS
TLS for in-transit encryption

22
Q

What is DynamoDB Accelerator (DAX)?

A

Fully managed, in-memory caching service for DynamoDB.
It reduces read latency from milliseconds to microseconds.

23
Q

Can DAX cache writes as well as reads?

A

No, DAX only accelerates read operations.
Writes go directly to DynamoDB.

24
Q

Which DynamoDB feature provides automatic deletion of expired items?

A

TTL (Time to Live)

25
You need a table to store user sessions that expire after 30 minutes. Which features help?
TTL + On-demand capacity mode
26
Your application needs a globally distributed, multi-master DynamoDB setup. Which feature should you use?
Global Tables
27
You have a table with uneven traffic on certain partition keys. What is a potential solution?
Redesign partition keys to ensure even distribution. Consider write sharding
28
How do you reduce read latency for frequently accessed DynamoDB items?
Use DAX caching