Amazon GameLift
Developer Guide (Version )

Package Build Files

Before uploading your Amazon GameLift-enabled game server to the Amazon GameLift service for hosting, you need to package all game server files into a build directory. This directory must include all components required to run your game servers, including the following:

  • Game server binaries – The binary files required to run the game server. A build can include binaries for multiple game servers, as long as they are built to run on the same platform (see supported platforms).

  • Dependencies – Any dependent files required by your game server executables to run. Examples include assets, configuration files, and dependent libraries.

  • Install script – Script file to handle tasks that are required to fully install your game build onto Amazon GameLift hosting servers. This file must be placed at the root of the build directory. An install script is run once as part of fleet creation.

Once you've packaged your build files, make sure your game server can run on a clean installation of your target operating system (not one that's been used for development). This step helps ensure that you include all required dependencies in your package and that your install script is accurate.


If you're storing your game build files in an Amazon S3 bucket for uploading, you need to package the build files into a .zip file. See instructions for uploading using this method in Create a Build with Files in Amazon S3 .

To observe the build packaging process in action, see the Amazon GameDev tutorials for Amazon GameLift.

Creating an Install Script

Create an install script the for the operating system of your game build:

  • Windows: create a batch file named "install.bat".

  • Linux: create a shell script file named "".

When creating an install script, keep in mind the following:

  • The script cannot take any user input.

  • A build is installed on a hosting server in the following locations. File directories in your build package are recreated.

    • For Windows fleets: C:\game

    • For Linux fleets: /local/game

  • During the installation process, the run-as user has limited access to the instance file structure. It has full rights to the directory where your build files are installed. If your install script takes actions that require administrator permissions, you'll need to specify admin access (sudo for Linux, runas for Windows). Permission failures related to the install script generate an event message indicating a problem with the script.

  • On Linux, common shell interpreter languages such as bash are supported. Add a shebang (such as #!/bin/bash) to the top of your install script. If you need to verify support for your preferred shell commands, you can remotely access an active Linux instance and open a shell prompt. Learn more at Remotely Access Fleet Instances.

Example scripts

These examples illustrate common script usage for Windows and Linux.


This example install.bat file installs Visual C++ runtime components required for the game server and writes the results to a log file. The component file is included in the build package at the root.

vcredist_x64.exe /install /quiet /norestart /log c:\game\vcredist_2013_x64.log


This example file illustrates using bash in your install script and writing results to a log file.

#!/bin/bash echo 'Hello World' > install.log