It’s been a while since this question has been posted but I thought would chime in. With regards to UE4 session data, there can be a lot that goes into this. Local data will exist on the instance of a running server application for as long as it runs, whether the server is hosted on AWS GameLift or not. Certain information can be replicated from your server to the clients depending on your game logic. If you want data to persist outside of the server executable’s lifetime, then you need an external database to store that information. For instance, AWS offers a NOSQL database service known as DynamoDb that can be used for this. In addition, for data about specific players/clients, the same argument applies. Data about players as they leave and join a game can be stored either locally in the running server process or in an external database.
As for your second question, the GameLift class in the AWS SDK has a lot of functions, one of them being the ability to create game sessions. The GameLiftClientSDK is essentially a wrapper around the AWS SDK so that functions from that SDK can be called using blueprints. But what happens when a client creates a game session is that GameLift is notified that there has been a request to create a game session, and in response, GameLift will try to find a server process that is available for hosting a game session running in the fleet specified in the arguments passed in. Since this takes time, a game session may not be fully activated right away. That’s why you have to later search for active game sessions within that same fleet and later choose one for the client to connect to.
As for your third question, if you created a custom OSS, then there’s a lot of flexibility when it comes to which GameLift features you want to use. For example, you can just upload a server build to GameLift, make a fleet for that build that runs a few ec2 instances, each running multiple copies of the server processes and theoretically not care about anything else. You would have the ip addresses and ports of the server applications running in AWS cloud, which is all you need to have clients connect to and be in the same server technically. Also note that when you quit server applications hosted on GameLift, they restart automatically so this could be useful information for someone reading. In my opinion that seems to be the bare minimum with the only gamelift code that has to be added being the call to the ProcessReady
function. From there, you can build up to include more GameLift features if you want.
At first, I also used the GameLiftClient SDK on Github directly in an Unreal Engine game client so that the client could make game and player sessions on GameLift and connect to the Unreal Engine game server hosted on GameLift. And that lead to my first couple of tutorial videos on the topic. Part 1 of that tutorial can be found here.
However, I ultimately realized that this approach goes against AWS’ recommended practices in that you shouldn’t directly embed long-term AWS credentials associated with an AWS account (access key and secret access key) into a UE4 client. So I decided to move away from the client sdk to a client service, which is in the form of API Gateway and AWS Lambda. Then, the client, instead of using the client sdk, would make http requests to this client service in order to communicate with GameLift and other AWS services. This also makes it easier to have the same project on different platforms (Windows, Android, Linux, MacOS, etc.) since for http requests, the native UE4 HTTP and JSON libraries are being used. In the end, I also delved into more features that AWS has to offer within and outside of GameLift and how to incorporate them into an Unreal Engine project while following recommended practices. I cover a lot of those concepts in depth in my new tutorial series. Part 1 of those updated tutorials can be found here.
Lastly, I just want to point out the client sdk is still a good plugin for getting setup quickly with GameLift and testing with small controlled groups.
I know this was a long post, but I just want to help clarify as much as I can anything related to GameLift and multiplayer development in UE4.