The mysql-events module in nodejs inside the lambda function deployed in serverless not detecting the changes made in database outside the lambda function from any other page. But it detects, when the change in datatbase made inside the lambda function. We cannot find why it is not detecting the changes made from other pages. So please provide some solution.
mysql-events requires a constant open connection to listen for changes on the database. Lambda functions only run when invoked and then are frozen until the next invocation. This means it will no longer be listening on that connection. This is similar to why websockets don’t work inside of lambda functions. Is it possible to use Socket.io with AWS Lambda? - Stack Overflow
Thank u so much @brianneisler.
Is there any other way to use mysql-events to listen for changes in database. Or is there any modules available to detect the changes in database within lambda function?