DynamoDB Triggers

DynamoDB Triggers allow you to execute custom actions (as code) based on item-level updates on a DynamoDB table.

Some use cases of DynamoDB Triggers include sending notifications, updating an aggregate table, and connecting DynamoDB tables to other data sources.

 

Creating / Using / Deleting Triggers

Create an AWS Lambda function (with the logic code) and associate the event-source for the function to a stream in DynamoDB Streams. Also, in the settings for the table for which the stream is enabled, you can associate Lambda function.

When the table is updated, the updates are published to Streams. In turn, AWS Lambda reads the updates from the associated stream and executes the code in the function.

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.

 

Trigger Pricing

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.

You are not charged for the reads that AWS Lambda function makes to the stream (via DynamoDB Streams).

 

Triggers – Important Points

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

Currently, DynamoDB Triggers supports Javascript, Java, and Python for trigger functions. Currently there are no native APIs to create, edit, or delete DynamoDB triggers; you have to use the AWS Lambda console.

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

 

DynamoDB Streams and AWS Lambda Triggers

Triggers automatically respond to events in DynamoDB Streams, and with triggers, you can build applications that react to data modifications in DynamoDB tables.

You can create triggers that will invoke a Lambda function.  AWS Lambda polls the stream and invokes your Lambda function synchronously when it detects new stream records.

Learn Serverless from Serverless Programming Cookbook

Contact

Please first use the contact form or facebook page messaging to connect.

Offline Contact
We currently connect locally for discussions and sessions at Bangalore, India. Please follow us on our facebook page for details.
WhatsApp (Primary): (+91) 7411174113
Phone (Escalations): (+91) 7411174114

Business newsletter

Complete the form below, and we'll send you an e-mail every now and again with all the latest news.

About

CloudMaterials is my blog to share notes and learning materials on Cloud and Data Analytics. My current focus is on Microsoft Azure and Amazon Web Services (AWS).

I like to write and I try to document what I learn to share with others. I believe that knowledge is useless unless you share it; the more you share, the more you learn.

Recent comments

Photo Stream