DynamoDB Flashcards

This deck aims to help retain concepts related to the DynamoDB service.

1
Q

What AWS service provides a serverless, NoSQL database ideal for modern application development, with no cold starts, version upgrades, maintenance windows, patching, or downtime?

A

DynamoDB

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

What is the value of a Write Capacity Unit (WCU) in AWS DynamoDB?

A

One WCU allows for one write per second for an item up to 1KB (rounds to nearest whole)

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

What is the value of a Read Capacity Unit (RCU) in AWS DynamoDB?

A

One RCU allows for one strongly consistent read operation per second, or two eventually consistent read operations per second for an item up to 4KB (rounds to nearest whole)

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

Which DynamoDB feature allows multiple application workers to scan segments of a table or secondary index in parallel?

A

Parallel Scan

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

What actions can be taken to improve application performance when interacting with a DynamoDB table?

A
  • Use queries instead of scans
  • Use parallel scans (if have to)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does the following AWS CLI command do for DynamoDB?

aws dynamodb create-table \ --table-name Customers \ --attribute-definitions \ AttributeName=ID,AttributeType=N \ AttributeName=Name,AttributeType=S \ --key-schema \ AttributeName=ID,KeyType=HASH \ AttributeName=Name,KeyType=RANGE \ --provisioned-throughput \ ReadCapacityUnits=10,WriteCapacityUnits=5

A

Creates a Customers table with ID (number) as the partition key and Name (string) as the sort key, along with provisioned throughput of 10 RCUs and 5 WCUs

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

What DynamoDB feature allows you to retrieve only specific attributes of an item?

A

Projection Expression

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

Which DynamoDB feature can prevent the creation of an item if it already exists or inhibit updates based on a specific condition?

A

Conditional Expressions

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

What parameter should be included in an AWS DynamoDB query to indicate the total read capacity consumed?

A

ReturnConsumedCapacity: TOTAL

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

What property ensures that the most up-to-date data is returned when retrieving an item from AWS DynamoDB?

A

ConsistentRead = true during the GetItem operation

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

What AWS DynamoDB operation retrieves attributes of one or more items from one or more tables and allows multiple Partition Key values in a single request?

A

BatchGetItem

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

When querying AWS DynamoDB with Conditional Expressions, what parameters are required?”

A
  • key condition expression (a string determining items to read)
  • partition key name and value
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What AWS DynamoDB feature can be used to create backups of your tables?

A

On-demand Backup

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

Which AWS DynamoDB operation allows grouping multiple actions into a single all-or-nothing transaction?

A

TransactWriteItems

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

Given the requirements of reading 60 items per second (6KB each) and writing 80 items per second (1.5KB each), how do you calculate the required RCUs and WCUs for AWS DynamoDB table?

A

To calculate RCU:
1. Item size / RCU value = 6 KB / 4 KB = 1.5 round to nearest whole = 2 RCU per item
2. Reads per second * RCU per item = 60*2 = 120 RCU

To calculate WCU:
1. Item size / WCU value = 1.5 KB / 1 KB = 1.5 round to nearest whole = 2 WCU per item
2. Writes per second * WCU per item = 80 * 2 = 160 WCU

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

How does DynamoDB Accelerator (DAX) handle strongly consistent reads with AWS DynamoDB?

A

For strongly consistent read requests, the DAX cluster passes all requests to DynamoDB without caching

17
Q

What is an efficient way to delete all data from DynamoDB table with minimal costs?

A

Delete the table and then re-create it using the DeleteTable operation

18
Q

How can you prevent write throttling when using a Global Secondary Index (GSI) in Amazon DynamoDB?

A

Ensure the provisioned write capacity of the GSI is equal to or greater than that of the base table, as updates write to both the table and the GSI