Invoke lamda async from Aurora PostgreSQL

0

A customer has setup Aurora PostgreSQL and any time a CDC occurs they need to trigger lambda function. e.g like in this Blog https://aws.amazon.com/blogs/database/capturing-data-changes-in-amazon-aurora-using-aws-lambda/

However there doesnt seem to invoke lambda from PostgreSQL..?

If there's none, how else have any of your customers accomplished this requirement?

AWS
asked 4 years ago1066 views
2 Answers
0
Accepted Answer

Calling Lambda from Aurora PostgreSQL is not yet supported. Rather than calling a lambda function in a trigger, you can consider consuming the change stream from PostgreSQL in a lambda function. See: https://aws.amazon.com/blogs/database/stream-changes-from-amazon-rds-for-postgresql-using-amazon-kinesis-data-streams-and-aws-lambda/

Think about the architecture and volume. Do they want to see every change, or only changes on a certain table?

How many changes per minute are they expecting?

If they are looking for the all changes or a high volume of changes, they may prefer using a small EC2 instance and a CDC tool like Debezium which can consume CDC records from PostgreSQL and publish to various targets. See: https://debezium.io/blog/2020/02/25/lessons-learned-running-debezium-with-postgresql-on-rds/ or: https://aws.amazon.com/blogs/apn/how-behalf-met-its-streaming-data-scaling-demands-with-amazon-managed-streaming-for-apache-kafka/

AWS
answered 4 years ago
0
Accepted Answer
profile pictureAWS
answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions