DynamoDB Flashcards

1
Q

How many facilities in a region is DynamoDB replicated

A

3

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

Eventual Consistent Reads vs. Strongly

A

Eventual (Default) consistency is usually reached in under 1 second and has the best performance. Strongly requires that the data has been completely written prior to the read.

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

What components are part of DynamoDB

A

Tables, Items (think rows), Attributes (think column of data in a row)

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

Type of primary key that is a single attribute (think unique id) Partition key a.k.a Hash key

A

Single Attribute

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

Type of primary key that composed of two attributes

A

Composite - Partition Key and Sort Key (Hash and Range)

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

What does DD use to determine the physical location where the data is stored

A

Partition Key - used as an input to an internal hash function to determine location

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

How are multliple items with the same Partition Key stored together

A

Using a different sort key. For example same userid creating multiple posts to a forum.

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

What type of Index can only be created when creating the table, cannot be removed or modified, and has the SAME partition key, different sort key.

A

Local Secondary Index

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

What type of index has a different partition key and different sort key and can be created at any time

A

Global Secondary Index

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

What is more efficient to use, Scan or Query

A

Query, since it find items in a table using only primary key attribute values.

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

What are DynamoDB streams used for?

A

To capture any kind of modification and then take certain action on those changes

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

What changes are captured by DynamoDB Streams during an update?

A

The before and after image of any attributes that were modified in the item

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

What changes are captured by DynamoDB Streams during an item delete from a table?

A

An image of the complete item before it was deleted

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

What is the lifetime of a Stream

A

24 hours and then the data is subject to trimming (removal) at any given time

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

How can you make a Scan operation more efficient?

A

Use the ProjectionExpression parameter which is like a filter

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

You have an application that requires to read 5 items at 10KB/sec using eventual consistency. What do you set the read throughput to?

A

Round 10 up the nearest multiple of 4, so 12. Then divide 12/4 = 3. Then multiple the items by rate/per sec, so 3 x 5 = 15. For eventual consistency /2 so = 7.5 round up to 8.

17
Q

How to calculate the Write throughput?

A

Just multiply the numbers.

18
Q

Why might you receive the 400 HTTP status code of ProvisionedThroughputExceededException

A

You have exceeded your maximum allow provisioned throughput for a table for one more global secondary indexes

19
Q

Steps to authenticate with an identity provider

A
  1. User authenticates with FB, 2. Token is passed, 3. You code calls AssumeRoleWithWebIdentity API and provides the providers token and specifies the ARN for the IAM role, 4. The app is now authenticated between 15min - 1 hour, 1 hour is default.
20
Q

What is special about Conditional Writes

A

They are idempotent

21
Q

What are Atomic Counters?

A

The are non-idempotent updates where you use the “UpdateItem” operation to increment or decrement the value of an existing attribute without interfering with other write requests. I.E. website hit counter

22
Q

When would you use the BatchGetItem call?

A

When you need to get multiple items at once.

23
Q

Limits of a single BatchGetItem request.

A

Can retrieve up to 1MB data containing up to 100 items. A single request can also contain items from multiple tables

24
Q

What limit of DynamoDB can be increased by a request to AWS?

A

Provisioned throughput limits and Table Size (initial limit of 256 tables per regions)