How to Trigger a lambda function with RDS database changes using SNS and serverless framework

1.9k Views Asked by At

I want to create a lambda that triggers when there is a changes in RDS table.

Using:
SNS
Mysql-Amazon aurora
Lambda
Serverless Framework.

Any tutorials or guides... Thanks guys.

1

There are 1 best solutions below

0
On

Have you explored the options of using a Database Activity Streams feature? You can essentially monitor the database activity of Amazon Aurora.

Database activity streams provide a near real-time data stream of the database activity in your relational database.

Under the hood, it uses below set of services and flow,

  1. A stream of database activity is pushed from Aurora to an Amazon Kinesis data stream
  2. From Kinesis, the activity stream can then be consumed by AWS services such as Amazon Kinesis Data Firehose and AWS Lambda

With above details, you can make a SAM template and configure the details of each of these services.