Amazon DynamoDB | Streams Flashcards

1
Q

In what regions is DynamoDB Triggers available?

Streams

Amazon DynamoDB | Database

A

DynamoDB Triggers is available in all AWS regions where AWS Lambda and DynamoDB are available.

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

What is DynamoDB Streams?

Streams

Amazon DynamoDB | Database

A

DynamoDB Streams provides a time-ordered sequence of item-level changes made to data in a table in the last 24 hours. You can access a stream with a simple API call and use it to keep other data stores up-to-date with the latest changes to DynamoDB or to take actions based on the changes made to your table.

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

What are the benefits of DynamoDB Streams?

Streams

Amazon DynamoDB | Database

A

Using the DynamoDB Streams APIs, developers can consume updates and receive the item-level data before and after items are changed. This can be used to build creative extensions to your applications built on top of DynamoDB. For example, a developer building a global multi-player game using DynamoDB can use the DynamoDB Streams APIs to build a multi-master topology and keep the masters in sync by consuming the DynamoDB Streams for each master and replaying the updates in the remote masters. As another example, developers can use the DynamoDB Streams APIs to build mobile applications that automatically notify the mobile devices of all friends in a circle as soon as a user uploads a new selfie. Developers could also use DynamoDB Streams to keep data warehousing tools, such as Amazon Redshift, in sync with all changes to their DynamoDB table to enable real-time analytics. DynamoDB also integrates with Elasticsearch using the Amazon DynamoDB Logstash Plugin, thus enabling developers to add free-text search for DynamoDB content.

You can read more about DynamoDB Streams in our documentation.

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

How long are changes to my DynamoDB table available via DynamoDB Streams?

Streams

Amazon DynamoDB | Database

A

DynamoDB Streams keep records of all changes to a table for 24 hours. After that, they will be erased.

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

How do I enable DynamoDB Streams?

Streams

Amazon DynamoDB | Database

A

DynamoDB Streams have to be enabled on a per-table basis. To enable DynamoDB Streams for an existing DynamoDB table, select the table through the AWS Management Console, choose the Overview tab, click the Manage Stream button, choose a view type, and then click Enable.

For more information, see our documentation.

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

How do I verify that DynamoDB Streams has been enabled?

Streams

Amazon DynamoDB | Database

A

After enabling DynamoDB Streams, you can see the stream in the AWS Management Console. Select your table, and then choose the Overview tab. Under Stream details, verify Stream enabled is set to Yes.

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

How can I access DynamoDB Streams?

Streams

Amazon DynamoDB | Database

A

You can access a stream available through DynamoDB Streams with a simple API call using the DynamoDB SDK or using the Kinesis Client Library (KCL). KCL helps you consume and process the data from a stream and also helps you manage tasks such as load balancing across multiple readers, responding to instance failures, and checkpointing processed records.

For more information about accessing DynamoDB Streams, see our documentation.

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

Does DynamoDB Streams display all updates made to my DynamoDB table in order?

Streams

Amazon DynamoDB | Database

A

Changes made to any individual item will appear in the correct order. Changes made to different items may appear in DynamoDB Streams in a different order than they were received.

For example, suppose that you have a DynamoDB table tracking high scores for a game and that each item in the table represents an individual player. If you make the following three updates in this order:

Update 1: Change Player 1’s high score to 100 points

Update 2: Change Player 2’s high score to 50 points

Update 3: Change Player 1’s high score to 125 points

Update 1 and Update 3 both changed the same item (Player 1), so DynamoDB Streams will show you that Update 3 came after Update 1. This allows you to retrieve the most up-to-date high score for each player. The stream might not show that all three updates were made in the same order (i.e., that Update 2 happened after Update 1 and before Update 3), but updates to each individual player’s record will be in the right order.

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

Do I need to manage the capacity of a stream in DynamoDB Streams?

Streams

Amazon DynamoDB | Database

A

No, capacity for your stream is managed automatically in DynamoDB Streams. If you significantly increase the traffic to your DynamoDB table, DynamoDB will automatically adjust the capacity of the stream to allow it to continue to accept all updates.

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

At what rate can I read from DynamoDB Streams?

Streams

Amazon DynamoDB | Database

A

You can read updates from your stream in DynamoDB Streams at up to twice the rate of the provisioned write capacity of your DynamoDB table. For example, if you have provisioned enough capacity to update 1,000 items per second in your DynamoDB table, you could read up to 2,000 updates per second from your stream.

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

If I delete my DynamoDB table, does the stream also get deleted in DynamoDB Streams?

Streams

Amazon DynamoDB | Database

A

No, not immediately. The stream will persist in DynamoDB Streams for 24 hours to give you a chance to read the last updates that were made to your table. After 24 hours, the stream will be deleted automatically from DynamoDB Streams.

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

What happens if I turn off DynamoDB Streams for my table?

Streams

Amazon DynamoDB | Database

A

If you turn off DynamoDB Streams, the stream will persist for 24 hours but will not be updated with any additional changes made to your DynamoDB table.

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

What happens if I turn off DynamoDB Streams and then turn it back on?

Streams

Amazon DynamoDB | Database

A

When you turn off DynamoDB Streams, the stream will persist for 24 hours but will not be updated with any additional changes made to your DynamoDB table. If you turn DynamoDB Streams back on, this will create a new stream in DynamoDB Streams that contains the changes made to your DynamoDB table starting from the time that the new stream was created.

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

Will there be duplicates or gaps in DynamoDB Streams?

Streams

Amazon DynamoDB | Database

A

No, DynamoDB Streams is designed so that every update made to your table will be represented exactly once in the stream.

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

What information is included in DynamoDB Streams?

Streams

Amazon DynamoDB | Database

A

A DynamoDB stream contains information about both the previous value and the changed value of the item. The stream also includes the change type (INSERT, REMOVE, and MODIFY) and the primary key for the item that changed.

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

How do I choose what information is included in DynamoDB Streams?

Streams

Amazon DynamoDB | Database

A

For new tables, use the CreateTable API call and specify the ViewType parameter to choose what information you want to include in the stream.

For an existing table, use the UpdateTable API call and specify the ViewType parameter to choose what information to include in the stream.

The ViewType parameter takes the following values:

ViewType: {

{ KEYS_ONLY,

NEW_IMAGE,

OLD_IMAGE,

NEW_AND_OLD_IMAGES}

}

The values have the following meaning: KEYS_ONLY: Only the name of the key of items that changed are included in the stream.

NEW_IMAGE: The name of the key and the item after the update (new item) are included in the stream.

OLD_IMAGE: The name of the key and the item before the update (old item) are included in the stream.

NEW_AND_OLD_IMAGES: The name of the key, the item before (old item) and after (new item) the update are included in the stream.

17
Q

Can I use my Kinesis Client Library to access DynamoDB Streams?

Streams

Amazon DynamoDB | Database

A

Yes, developers who are familiar with Kinesis APIs will be able to consume DynamoDB Streams easily. You can use the DynamoDB Streams Adapter, which implements the Amazon Kinesis interface, to allow your application to use the Amazon Kinesis Client Libraries (KCL) to access DynamoDB Streams. For more information about using the KCL to access DynamoDB Streams, please see our documentation.

18
Q

Can I change what type of information is included in DynamoDB Streams?

Streams

Amazon DynamoDB | Database

A

If you want to change the type of information stored in a stream after it has been created, you must disable the stream and create a new one using the UpdateTable API.

19
Q

When I make a change to my DynamoDB table, how quickly will that change show up in a DynamoDB stream?

Streams

Amazon DynamoDB | Database

A

Changes are typically reflected in a DynamoDB stream in less than one second.

20
Q

If I delete an item, will that change be included in DynamoDB Streams?

Streams

Amazon DynamoDB | Database

A

Yes, each update in a DynamoDB stream will include a parameter that specifies whether the update was a deletion, insertion of a new item, or a modification to an existing item. For more information on the type of update, see our documentation.

21
Q

After I turn on DynamoDB Streams for my table, when can I start reading from the stream?

Streams

Amazon DynamoDB | Database

A

You can use the DescribeStream API to get the current status of the stream. Once the status changes to ENABLED, all updates to your table will be represented in the stream.

You can start reading from the stream as soon as you start creating it, but the stream may not include all updates to the table until the status changes to ENABLED.

22
Q

What is the Amazon DynamoDB Logstash Plugin for Elasticsearch?

Streams

Amazon DynamoDB | Database

A

Elasticsearch is a popular open source search and analytics engine designed to simplify real-time search and big data analytics. Logstash is an open source data pipeline that works together with Elasticsearch to help you process logs and other event data. The Amazon DynamoDB Logstash Plugin make is easy to integrate DynamoDB tables with Elasticsearch clusters.

23
Q

How much does the Amazon DynamoDB Logstash Plugin cost?

Streams

Amazon DynamoDB | Database

A

The Amazon DynamoDB Logstash Plugin is free to download and use.