DynamoDB Flashcards

1
Q

Elasticache

A

Webservice that makes it easy to to scale an in memory cache in the cloud.

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

Elasticache Case Point

A

Retrieve top daily deals. Use cache instead of of DB.

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

DynmoDB

A

1) NOSQL DB single digit milisecond latency
2) Stored on SSD
3) 3 Geographically distinct locations

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

2 Types of Primary Keys

A

1) Single Attribute

2) Composite

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

Single Attribute

A

Partition key (also known as HashKey)

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

Composite

A

Partition Key + Sort Key.

Can have the same Partition key (so they are all stored together) but different sort key.

All sorted by sort key value

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

Streams

A

Captures any modification of DynamoDB Table. Can trigger Lambda functions through use of triggers. Streams must be enabled.

1) New Item - Captures Entire Image
2) Delete - Captures image of entire item
3) Update - Captures before and after image of any attribute modified

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

Query

A

Find items in a table by using only the primary key.

You must provide a partition key attribute name and distinct value to search for.

Typically the most efficient search.

Sort order is Ascending by default and you can use ScanIndexForward to reverse order

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

Project Expression

A

Allows you to specify what attributes to return on either Queries or Scans.

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

ScanIndexForward

A

Used to change the Sort order of a Query Only. By Default queries sort are Ascending by default and you can use ScanIndexForward to reverse order.

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

Scan

A

Examines every item and returns every attribute by default. Must use ProjectExpression to limit attributes.

-Optimize Scan by designing the tables to

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

Index Types

A

1) Local Secondary Index

2) Global Secondary Index

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

Local Secondary Index

A
  • Same Partition Key
  • Different Sort Key.

Can only be created during table creation. Cannot be deleted.

Supports both Eventual and Strong Consistency

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

Global Secondary Index

A
  • Different Partition Key
  • Different Sort Key

Can be created at anytime and can be deleted.

Supports only Eventual Consistency

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

Eventual Consistent Read Formula

A

(Read Size nearest 4KB/4KB) * (Items) / 2 =Eventual Consistent Read Throughput

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

Eventual Consistent Reads

A
  • Read 4KB

- 2 Reads per second

17
Q

Strongly Consistent Reads

A

-1 Read per second

18
Q

Strongly Consistent Read Formula

A

(Read Size nearest 4KB/4KB) * (Items) =Eventual Consistent Read Throughput

19
Q

Eventual & Strongly Consistent Write Formula

A

(KB Size) * (Items) = Write Throughput

20
Q

Web Identity Provider Process

A

1) User Autheticates with ID Provider (Such as Facebook, Google, Amazon)
2) Provider passes back a token
3) Your code calls AssumeWithWebIdentity API. Uses providers token and specifies the ARN (Amazon Resource name) for the IAM Role.
4) App can now access DynamoDB between 15min-1hr. Set to 1hr by default.

21
Q

Exceeded Throughput Error

A

400 HTTP Status code -

ProvisionedThroughputExceededException

22
Q

Conditional Writes

A

You can send multiple conditional write statements but only the 1st works. Perfect for banking.

23
Q

Atomic Counters

A

Counter that you can change unconditionally.

Use UpdateItem to increment/decrement.

Great for unimportant counters as they are not Idempotent.

24
Q

Batch Operations

A

Allows app to read multiple items/tables.

25
Q

Projected Indexes

A

Data in index is copied from table

26
Q

Security for DynamoDB

A

IAM/Fine Grained Access Control

27
Q

Pricing

A

Charged by throughput capacity

28
Q

Data Replication

A

Amazon replicates data across 3 Regions

29
Q

When should you not use DynamoDB

A

Large amount of rarely accessed data. Giant blobs are better stored in S3.

30
Q

Attribute Limitation

A

No limit of attributes within an item.

31
Q

Item Size Limit

A

400 KB including attributes/names/values

32
Q

DynamoDB Data Structure

A

Key-Value and document data structure.

33
Q

JSON Datatype supported?

A

No, however you can convert by using Document SDK

34
Q

Limit on throughput

A

No limit on throughput. Must contact sales once it gets so high.

35
Q

AutoScalling - When is it ideal

A

Ideal for predictable requests with sustained usage for minutes to hours.