#WebSocket working locally but not when mounted to an EC2 and amplify

9 messages · Page 1 of 1 (latest)

mossy sentinel
#

Hi, I am developing a web app using nestjs and angular, when I work on my local environment it works fine, but when I started it hosting it in AWS my websocket started rejecting the connection, I already setted the CORS in my server side and I am almost sure he configurations in AWS are ok too, anyone knows why this could be happening?. I can show code snippets if it helps. I pasted the error I get in my client side, thanks

late hill
#

If it's working fine locally but not on AWS, it will be an AWS config issue

mossy sentinel
#

Oh thats good to know, Ill give it another look, I thought the load balancers and EC2 was correctly configured

late hill
mossy sentinel
#

Will do, thanks

#

I didnt got a connection, so I guess its an AWS setting, just re runned it locally and it worked

#

Do you know a documentation on how the AWS config should look like? I thought I had it correctly set

late hill
#

you need to enable your ws/wss ports in the loadbalancer

#

just like you did with your http/https ports