Setting up Ratchet on AWS

元气小坏坏 提交于 2019-12-11 16:59:15

问题


I am trying to enable web services on my AWS elastic beanstalk LAMP project.

I just want to set up an auditing system. My requirements are fairly simple:

  • Websocket connection
  • Save incoming (JSON) messages to my mySQL db

In this regard, I asked this question yesterday: How can I set up Web Sockets on AWS and log incoming messages to s3 (elastic beanstalk project) mysql db

But having read the answer I got on this, and reading through the AWS API Gateway documentation I linked to on that question, I have come back to thinking that to do this, I need to use Ratchet. It doesn't seem like AWS API Gateway or AWS Lambda can fulfill my requirements (or?)

So in terms of installing Ratchet: Is it as simple as ssh-ing in, and using git ...?

  • Connecting to my mySQL db: Are the environment constants that Amazon makes available on my PHP page (i.e. RDS_HOSTNAME, etc) going to be available? If not, can/should I add them manually to a config file? What about the mySQL connector (.so) plugin - does that need to be installed / configured?
  • Do I need to open the port / do something with my loadbalancer to open the ws port? --edit-- I am looking over a number of other posts, and I see that I absolutely need to set this up with the load balancer, but there's plenty of stuff on this.
  • Anything else I am not aware of?

--update--

Maybe I don't need Ratchet at all. I think for what I want I might be able to use an AWS Lambda to log incoming web socket messages. Would this work? If so, can you tell me how to go about setting this up?

来源:https://stackoverflow.com/questions/58899792/setting-up-ratchet-on-aws

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!