Accessing Your GameLift Instance

Feb. 20, 2020, 1:45 p.m.

A short guide on accessing your GameLift instance via RDP or ssh.


 

Prerequisites

  • AWS CLI
  • A GameLift fleet already created
  • Patience

 

This guide is assuming you're on Windows as your main OS, but if you're using Linux then the commands will be the same for AWS, but the system commands like changing the ssh key permission for Linux would be chmod 400 gameliftkey.pem.

 

Windows

  1. Open Command Prompt (cmd) and type in aws gamelift describe-instances --fleet-id <your-fleet-id>. Replace <your-fleet-id> with your actual fleet id which you can find here.
  2. Now in cmd run aws gamelift get-instance-access --fleet-id <your-fleet-id> --instance-id <your-instance-id>. Again replace the contents in <test> with the details from the command above.
  3. Excellent, now you can log into your instance. Open Remote Desktop Connection (RDP) on Windows (Windows key and type in RDP). Log in with the details from the command above.


  4. To access your game go to C:\Game.

 

Linux

  1. Open Command Prompt (cmd) and type in aws gamelift describe-instances --fleet-id <your-fleet-id>. Replace <your-fleet-id> with your actual fleet id which you can find here.
  2. Now in cmd run aws gamelift get-instance-access --fleet-id <your-fleet-id> --instance-id <your-instance-id> --query InstanceAccess.Credentials.Secret --output text > gameliftkey.pem. Again replace the contents in <test> with the details from the command above. This will generate an ssh key for you.
  3. Right click the gameliftkey.pem and make it readonly. (Right click -> Properties -> Read-only) (you might not have to do this, but do it if it complains about file permissions)
  4. Great! In cmd run ssh -i gameliftkey.pem [email protected]<your server ip>. Remember to replace the <your server ip> with the one from step 1. If this is your first time accessing the instance it will ask you something about a fingerprint - just type yes.
  5. Awesome now you should be logged in.
  6. To access your game go to /local/game.

 

until next time