Tutorial: Uploading your server build This tutorial walks you through the steps to setup and upload your server build to Amazon GameLift including prerequisites, installing the AWS CLI (command-line interface), adding the appropriate AWS permissions and multiple ways to upload. At the end of the tutorial you will have uploaded a Multiplayer Project dedicated server build to Amazon GameLift. Amazon GameLift uses the information and components you provide to create a fleet, which is a single version of your game. For more information about fleets, see the Creating a Fleet tutorial. You will learn how to do the following: Install the AWS CLI Add appropriate permissions to an AWS account Upload your game server build Prerequisites To upload your build package, you need the following: A game server folder package - See the Packaging your server build tutorial. AWS credentials - Username, access key, and secret key. o See the Configuring your AWS Account section in this tutorial. Step 1: Install the AWS CLI The Amazon Web Services CLI is the primary tool used to upload builds to Amazon GameLift. To install the AWS CLI 1. In a web browser navigate to https://aws.amazon.com/cli/ and download the appropriate installer for your operating system. 2. Run the installer and follow the instructions to complete the installation. 3. Next, open a command line window and run aws configure 4. Follow the prompts to enter your AWS access key and AWS secret key. 5. When given the option to select a default region and output format, press ENTER to accept the defaults.
The AWS CLI is now installed and configured. Step 2: Configuring your AWS account Before uploading your build, you must give your AWS account the appropriate permissions to upload packages to Amazon GameLift and to allow game client (player) access to Amazon GameLift. In this step, you will create a new policy and assign it to an AWS user that will give the user permission to upload a build. Note: For security purposes, a user s AWS secret key is displayed only when the credentials are created. If you do not know your user s AWS secret key, you will need to rotate the user credentials or create a new user. To add a new GameLift policy to an AWS user 1. Log in to the AWS web console and click Identity & Access Management.
2. In the navigation pane, click Policies. 3. In the content pane, click Create Policy.
4. Next to Create Your Own Policy, click Select.
5. Enter a name for the policy and, if desired, a description. 6. In the Policy Document field, paste the following policy: { "Version": "2012-10-17", "Statement": { "Effect": "Allow", "Action": "gamelift:*", "Resource": "*" } } 7. Click Create Policy.
8. Next, on the Policies page, select the policy you just created by clicking the checkbox next to the policy name, then select Policy Actions > Attach 9. On the Attach Policy page, select the user associated with your AWS access key and secret key from the list of users and click Attach Policy. You have now assigned a policy to an AWS user that gives them permission to upload builds to Amazon GameLift. Step 3: Uploading your build using the CLI In this step you ll use the AWS CLI to upload the MultiplayerProject server build to Amazon GameLift.
To upload the MultiplayerProject game server build 1. In a command line window, enter the following: aws gamelift upload-build --name [user-defined name of build] --build-version [user-defined build number] --build-root [path to the game server folder] Example: aws gamelift upload-build --name "MultiplayerProject Test Build" --build-version "1.2.3" --build-root C:\LumberyardSDK\dev\MultiplayerProject\MultiplayerProject_pc_Paks_Dedicate d It may take some time for the build to upload depending on your network connection and the size of the build. 2. While the build is uploading, in a web browser, navigate to the GameLift web console and open the Builds page. On it you will see that a new build entry has been created with a unique build ID and the build information you specified in the previous step.
After the server binaries are uploaded, you will see the same build ID in the command line window. Congratulations! You have successfully uploaded a server build to Amazon GameLift. Related tasks and tutorials Now that you have uploaded your server build, see what else you can do with Amazon GameLift: Tutorial: Creating a fleet Tutorial: Creating and connecting to a game session We d love to hear from you! Head to our Tutorial Discussion forum to share any feedback you have, including what you do or don t like about our tutorials or new content you d like to see in the near future.