GameSparks Matchmaking and starting dedicated servers on AWS
(Thanks to Josh Markiewicz from Epic Games for the high level explanation of Paragon Servers)
(Thanks to Pádraig from GameSparks for Node.js setup)
So how does it all work?
Well first of all I used Node.js to start the UDP server and listen server (not to be confused with UE4 listen server). When the game starts, it will first connect to GameSparks (which will always be successful as long as you have internet connection) and shows you the login screen. When player press the login button it will send a UDP packet (FUDPPing::UDPEcho) to the UDP server created by Node.js on our AWS EC2 instance. It will then sent a reply back to the client and if this message is received game shows the Main Menu screen.
In LogEventRequest Cloud Code, compare the eventKey and send a new message but this time include the IP and Port as the data for this message and then send it.
In our game we receive the above message which includes the proper IP and port which we want to connect to so we simply use open console command to connect to that IP and port and we are done!