Amazon DynamoDB | Triggers Flashcards
Can I delete a replica group after it is created ?
Triggers
Amazon DynamoDB | Database
Yes, deleting the replication group will delete the EC2 instance for the group. However, you will have to delete the DynamoDB metadata table.
What is DynamoDB Triggers?
Triggers
Amazon DynamoDB | Database
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.
What can I do with DynamoDB Triggers?
Triggers
Amazon DynamoDB | Database
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 does DynamoDB Triggers work?
Triggers
Amazon DynamoDB | Database
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.
What does it cost to use DynamoDB Triggers?
Triggers
Amazon DynamoDB | Database
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.
Is there a limit to the number of triggers for a table?
Triggers
Amazon DynamoDB | Database
There is no limit on the number of triggers for a table.
What languages does DynamoDB Triggers support?
Triggers
Amazon DynamoDB | Database
Currently, DynamoDB Triggers supports Javascript, Java, and Python for trigger functions.
Is there API support for creating, editing or deleting DynamoDB triggers?
Triggers
Amazon DynamoDB | Database
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 do I create a DynamoDB trigger?
Triggers
Amazon DynamoDB | Database
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 do I delete a DynamoDB trigger?
Triggers
Amazon DynamoDB | Database
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.
I have an existing AWS Lambda function, how do I create a DynamoDB trigger using this function?
Triggers
Amazon DynamoDB | Database
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.