Fleet Initialization Failed: Cannot run program /local/game/install.sh

I’m running into a problem with getting my install script (install.sh) to run on the fleet’s creation. I’ve packaged and uploaded my game build:

aws gamelift upload-build --name Game --build-version 1 --build-root C:/path/to/GameDir --operating-system AMAZON_LINUX --region us-east-1

My directory is currently structured like so:


NOTE: I’m running the upload-build command while I’m inside of the Game/ directory. The instance doesn’t seem to be able to find either of the install.sh files

Cannot run program "/local/game/install.sh" (in directory "/local/game"): error=2, No such file or directory

My game seems to be uploaded to /local/game/GameDir so I’m not sure where its trying to get install.sh from. Any ideas?

Hello @glitchyme

install.sh (or install.bat) needs to be at the root of the build you upload the GameLift. If that’s the case, then GameLift will run the file at Fleet creation time.

If my local directory looks like this:

  Game/ install.sh

Then I would run this CLI command to upload a build:

aws gamelift upload-build --name MyGame --build-version 1 --build-root C:/path/to/Game --operating-system AMAZON_LINUX --region us-east-1

GameLift should be able to run the install.sh. Let me know if this is not the case.

That said, I notice that you have an *.exe file in your build and you’re creating a Linux fleet. Is this the intention? There is a couple of options to do that, but I would like to know more about your use case here.

Regardless, let’s assume this is what we want to do. Then, when creating the Fleet, I would make sure that the runtime configuration’s launch path is:


Which respects the folder structure of the build I uploaded before.

Does that make sense?



Thanks @Alexis

I tried it again and ran into the same error message. install.sh is in the root directory, my game is in a subdirectory, and I specify the build-root as the root directory C:/path/to/Game. I don’t believe I can ssh in to review the logs or folder structure either after its failed or while its activating

With regards to the Linux/.exe file we intend to run our game servers through wine. Part of the install.sh script will be responsible for installing and setting up wine

If the fleet is in “Activating”, “Active” or “Error” state you can connect to the instances. How to get the instance creds is pretty buried and you need to use the API to do so

Get your instances

aws gamelift describe-instances --fleet-id "fleet-id"

Get the creds for an instance

aws gamelift get-instance-access --fleet-id "fleet-id" --instance-id "i-0"

Make sure you also have the ssh port for linux and RDP port open in your port settings so you can connect.

I would love to see some better logging with the fleet installation / creation, or the ability to prevent an instance from being terminated when there’s an error. Its beginning to look like the error message isn’t exactly accurate, and that its actually running into problems executing the script instead. I got rid of the Windows CRLF newlines and the error message doesn’t come up anymore. However, I’m now presented with a new error

Fleet fleet-********-****-****-****-************ changed state to ERROR

More importantly, getting rid of the install.sh script altogether allows my game to actually run

I run into the same problem.
install.sh is in the root, but

Cannot run program “/local/game/install.sh” (in directory “/local/game”): error=2, No such file or directory

If I do not add the install.sh there is an error that the file is missing.

Can someone post a working install.sh? Thanks.

However, above page contains no install.sh script with the content required when deploying a Linux Build.
I am looking for the default install.sh file content, requested per the GameLift Fleet creation process.