Connection to custom unity server using mirror

Hello,
I started integrating my multiplayer game made with unity and mirror as networking api.
I created a Lambda function which creates new game session and player session upon request “following the gamelift frog tutorial” and created a new Cognito pool.
When i request a response of the Lambda using the “CognitoAWSCredentials” i get a response object including all the data i need, so far so good.
But, when i try to connect to the game session server with mirror through the ip address and port i get a warning that it didn’t connect to the server.
Checking the gamelift console i see the game session created correctly and the player session too.
My setup as follows :

  • Unity 2019.4.20f
  • Mirror
  • Using mirror network manager with KCP transport layer
  • A fleet with unity server linux build and UDP port
    Investgating further, when i try to telnet ping the ip and port yield a connection failure.
    Testing the same exact build in an EC2 instance works just great.
    Please, let me know if you have any idea where the issue lies

Some things to check:

  • The server process is healthy and the game session is still active, as you are trying to connect. Ensure your game session timeout is long enough for your connection attempt.
  • Player sessions are valid for 60s, so if you are seeing issues with Player sessions being terminated, then you may need to reduce latency in your processes.
  • Ensure the server port you are connecting too, is the port the server is actually bound and listening to (ie Check what you set in ProcessReady is correct)
  • If using TLS that you have the correct certs both end of the connection
  • Check to see if your server sees any sign of the connection (add plenty o’ logs) - this will help indicate when the connection attempt is failing.
    • Understand how to remote into the instance hosting the process running the game sessions, so you can tail logs live.
  • The gamelift server is healthy and the session stays active i don’t terminate it.
  • When a player trys to connect to the game session, i get a player session is reserved but after 60 sec it gets Time out, because i can’t talk to the server to accept the player session.
  • No TLS
  • The client can’t connect to the server so the server doesn’t see any signs i added lot’s and lot’s of debugs
    the other thing is my build worked perfectly on EC2 instance so i don’tt know what stopping it from connection to gamelift instance

Oh, did you open the correct fleet ports for your server port range? By default your GameLift resources do not allow any incoming connections, they only allow outbound connections.

You have to tell GameLift explicitly which ports you want open on your instances. See CreateFleet - Amazon GameLift Service