miraquee
miraquee

Reputation: 199

Real-time listening with MySQL server in AWS RDS

I want to create a MySQL instance on AWS RDS and provision a RDS proxy with it for handling lambda requests against the API calls through the API Gateway. I am quite new to AWS and this is the solution I found on the internet on how to best run a MySQL database on AWS. Please do correct me if this is wrong or I should try something better instead.

So anyway this is my setup I wish to carry on. I suspect that fetching data and performing CRUD operations through this will be easy. But I wonder how can I create WebSockets in RDS for a real-time chat feature in my application? Please guide me on how should I achieve this as I have not found any articles regarding this on the internet. Thanks!

Upvotes: 1

Views: 926

Answers (1)

oucel
oucel

Reputation: 46

You should use AWS API Gateway to create Websocket service not AWS RDS. Please check this resource.

RDS Proxy is one of the way to manage connections. Another solution is AWS Aurora Serverless but you need connect to database within VPC.

Maybe you can consider use serverless framework or chalice to make things easier.

If you want to invoke an AWS lambda function in your query, you can call lambda_sync or lambda async function.

Upvotes: 3

Related Questions