This guide describes how to manually update a server executable in-place on existing fleet instances without going through the typical GameLift build and fleet creation process.
- You will need access to a server executable for your game (and any files it depends on).
- To take advantage of this process you must have a pre-existing GameLift fleet that runs on Managed EC2 instances.
- You will need to have the AWS CLI installed on your local machine.
- You must have valid IAM access credentials. There are a number of ways to set this up, they are outlined here.
- If you run into any issues with access or permissions during this process, it is recommended that your IAM role or user is allowed to take the actions listed below. You can find information on how to change permissions for a user here.
gamelift:ListFleets
gamelift:DescribeFleetAttributes
gamelift:DescribeInstances
gamelift:GetComputeAccess
gamelift:UpdateFleetPortSettings
ec2:CreateKeyPair
- For users with Windows on their local machine:
- You will need an SSH client installed. Git for Windows comes bundled with OpenSSH. You can also install OpenSSH separately.
- Most commands outlined here are platform agnostic, but some of them require bash to work properly. Any such commands have been tested and function properly in Git Bash which comes bundled with Git for Windows. You may also be able to run equivalent commands in Powershell.
- GameLift uses SSM to manage remote instance connections. In order to use SSM you will need to install the SSM CLI plugin from Amazon. You can find instructions to do this here.
The first thing we will need to find is the unique id of the fleet you would like to update.
NOTE: If you do not see your fleet in the results you may not be querying the proper AWS region (you can override this using the --region
parameter).
We'll want to use one of the FleedId
s from these results.
# List available fleets
$ aws gamelift list-fleets
{
"FleetIds": [
"fleet-a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
"fleet-a1b2c3d4-5678-90ab-cdef-EXAMPLE33333",
"fleet-a1b2c3d4-5678-90ab-cdef-EXAMPLE44444"
]
}
# Replace <fleet-id> with one or more of the fleet ids returned by the `list-fleets` command separated by a comma
$ aws gamelift describe-fleet-attributes --fleet-ids <fleet-id>
{
"FleetAttributes": [
{
"FleetId": "fleet-a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
"Name": "my fleet",
"BuildId": "build-11111111-1111-1111-1111-111111111111"
# Abbreviated here for the sake of space
}
]
}
Now that we have our fleet ID we need to find an instance to actually update. Make sure that you take note of both the InstanceId
, and OperatingSystem
here, this will determine which guide you will need to follow later.
# Replace <fleet-id> with the id of your fleet
$ aws gamelift describe-instances --fleet-id <fleet-id>
{
"Instances": [
{
"FleetId": "fleet-a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
"InstanceId": "i-01111111111111111",
"OperatingSystem": "AMAZON_LINUX_2",
# Abbreviated here for the sake of space
}
]
}
We now have all of the information we need to proceed:
FleetId
InstanceId
OperatingSystem
If you do not know any of these values please revisit the previous steps!
At this point you must choose the correct guide to follow based on which OperatingSystem
the GameLift fleet is using.
Further instructions are found here: