Amazon DynamoDB | Triggers Flashcards

1
Q

Can I delete a replica group after it is created ?

Triggers

Amazon DynamoDB | Database

A

Yes, deleting the replication group will delete the EC2 instance for the group. However, you will have to delete the DynamoDB metadata table.

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

What is DynamoDB Triggers?

Triggers

Amazon DynamoDB | Database

A

DynamoDB Triggers is a feature which allows you to execute custom actions based on item-level updates on a DynamoDB table. You can specify the custom action in code.

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

What can I do with DynamoDB Triggers?

Triggers

Amazon DynamoDB | Database

A

There are several application scenarios where DynamoDB Triggers can be useful. Some use cases include sending notifications, updating an aggregate table, and connecting DynamoDB tables to other data sources.

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

How does DynamoDB Triggers work?

Triggers

Amazon DynamoDB | Database

A

The custom logic for a DynamoDB trigger is stored in an AWS Lambda function as code. To create a trigger for a given table, you can associate an AWS Lambda function to the stream (via DynamoDB Streams) on a DynamoDB table. When the table is updated, the updates are published to DynamoDB Streams. In turn, AWS Lambda reads the updates from the associated stream and executes the code in the function.

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

What does it cost to use DynamoDB Triggers?

Triggers

Amazon DynamoDB | Database

A

With DynamoDB Triggers, you only pay for the number of requests for your AWS Lambda function and the amount of time it takes for your AWS Lambda function to execute. Learn more about AWS Lambda pricing here. You are not charged for the reads that your AWS Lambda function makes to the stream (via DynamoDB Streams) associated with the table.

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

Is there a limit to the number of triggers for a table?

Triggers

Amazon DynamoDB | Database

A

There is no limit on the number of triggers for a table.

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

What languages does DynamoDB Triggers support?

Triggers

Amazon DynamoDB | Database

A

Currently, DynamoDB Triggers supports Javascript, Java, and Python for trigger functions.

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

Is there API support for creating, editing or deleting DynamoDB triggers?

Triggers

Amazon DynamoDB | Database

A

No, currently there are no native APIs to create, edit, or delete DynamoDB triggers. You have to use the AWS Lambda console to create an AWS Lambda function and associate it with a stream in DynamoDB Streams. For more information, see the AWS Lambda FAQ page.

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

How do I create a DynamoDB trigger?

Triggers

Amazon DynamoDB | Database

A

You can create a trigger by creating an AWS Lambda function and associating the event-source for the function to a stream in DynamoDB Streams. For more information, see the AWS Lambda FAQ page.

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

How do I delete a DynamoDB trigger?

Triggers

Amazon DynamoDB | Database

A

You can delete a trigger by deleting the associated AWS Lambda function. You can delete an AWS Lambda function from the AWS Lambda console or throughput an AWS Lambda API call. For more information, see the AWS Lambda FAQ and documentation page.

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

I have an existing AWS Lambda function, how do I create a DynamoDB trigger using this function?

Triggers

Amazon DynamoDB | Database

A

You can change the event source for the AWS Lambda function to point to a stream in DynamoDB Streams. You can do this from the DynamoDB console. In the table for which the stream is enabled, choose the stream, choose the Associate Lambda Function button, and then choose the function that you want to use for the DynamoDB trigger from the list of Lambda functions.

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