AWS Security ChangesHomeSearch

AWS gamelift high security documentation change

Service: gamelift · 2025-04-11 · Security-related high

File: gamelift/latest/developerguide/unreal-plugin-anywhere.md

Summary

Updated documentation structure and content for setting up local hosting with GameLift Anywhere. Removed detailed server integration code examples and simplified instructions by referencing external integration guides. Added emphasis on using AWS CLI for manual client testing and backend service requirements.

Security assessment

The removed code examples previously included insecure logging of sensitive credentials (authToken, accessKey, secretKey) via UE_LOG statements. By eliminating these lines from the documentation, the change addresses a security risk where credentials could be exposed in logs.

Diff

diff --git a/gamelift/latest/developerguide/unreal-plugin-anywhere.md b/gamelift/latest/developerguide/unreal-plugin-anywhere.md
index 62c95384f..9c231238c 100644
--- a//gamelift/latest/developerguide/unreal-plugin-anywhere.md
+++ b//gamelift/latest/developerguide/unreal-plugin-anywhere.md
@@ -7 +7 @@ Step 1: Set your profile.Step 2: Set up your game codeStep 3: Connect to an Anyw
-# Plugin for Unreal: Set up local testing with Amazon GameLift Servers Anywhere
+# Plugin for Unreal: Host your game locally with Amazon GameLift Servers Anywhere
@@ -9 +9 @@ Step 1: Set your profile.Step 2: Set up your game codeStep 3: Connect to an Anyw
-Use this plugin workflow to integrate your client and server game code with Amazon GameLift Servers functionality, build your client and server game components, and then set up your local workstation as a test game server host. 
+Use this workflow to set up your local workstation as a game server host using an Anywhere fleet. You can use it to test your game server integration before deploying to a cloud-based managed fleet. It can also be useful for local testing during iterative game development.
@@ -33 +33 @@ Choose the profile you want to use when following this workflow. The profile you
-In this step, you make a series of updates to your client and server code to add hosting functionality. When ready, package your game components.
+In this step, prepare your game server and game client builds to work with Amazon GameLift Servers. If you haven't yet integrated your game code, see [Plugin for Unreal: Integrate your game code](./unreal-plugin-integrate.html). Enter the paths to your game executables on your local workstation.
@@ -35 +35 @@ In this step, you make a series of updates to your client and server code to add
-With the plugin, can take advantage of some conveniences when integrating your game code. You can do a minimal integration to set up basic hosting functionality. You can also do a more extensive custom integration. The information in this section describes the minimal integration option. For server integration, use the provided code sample to update your project's game mode. For client integration, use the test maps included with the plugin to add client Amazon GameLift Servers functionality to your game project. 
+  * Game server: Integrate your game server with the server SDK for Amazon GameLift Servers and package your game server build. For instructions, see [Plugin for Unreal: Integrate your game code](./unreal-plugin-integrate.html). The game server must be integrated with the server SDK in order to establish communication with the Amazon GameLift Servers service and respond to prompts to start new game sessions and accept game client connections.
@@ -37 +37 @@ With the plugin, can take advantage of some conveniences when integrating your g
-  * Integrate your server game mode 
+  * Game client: At minimum, you need a game client that can connect to your game server using IP address and port information. If you don't yet have your game client components set up for Amazon GameLift Servers, you can use the AWS CLI tool to manually request new game sessions, get connection information, and use that information to connect the game client. 
@@ -39 +39 @@ With the plugin, can take advantage of some conveniences when integrating your g
-  * Integrate your client game map 
+At some point, you'll need to have a backend service to send new game sessions requests to the Amazon GameLift Servers service and relay connection information back to a game client. You can use the test maps included with the plugin to add client Amazon GameLift Servers functionality to your game project. For help with building a custom solution, see [Add Amazon GameLift Servers to your game client](./gamelift-sdk-client-api.html).
@@ -41 +40,0 @@ With the plugin, can take advantage of some conveniences when integrating your g
-  * Package your game components
@@ -45,429 +43,0 @@ With the plugin, can take advantage of some conveniences when integrating your g
-
-### Integrate your server game mode 
-
-Add server code to your game that enables communication between your game server and the Amazon GameLift Servers service. Your game server must be able to respond to requests from Amazon GameLift Servers, such as to start a new game session, and also report status on game server health and player connections.
-
-If you haven't already set up a source-built version of the Unreal editor, the plugin provides links to instructions and source code.
-
-###### To add server code for Amazon GameLift Servers
-
-  1. In your code editor, open the solution (`.sln`) file for your game project, usually found in the project root folder. For example: `GameLiftUnrealApp.sln`.
-
-  2. With the solution open, locate the project game mode header file: `[project-name]GameMode.h` file. For example: `GameLiftUnrealAppGameMode.h`. 
-
-  3. Change the header file to align with the following example code. Be sure to replace "GameLiftServer" with your own project name. These updates are specific to the game server; we recommend that you make a backup copy of the original game mode files for use with your client.
-    
-        // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
-    // SPDX-License-Identifier: Apache-2.0
-    
-    #pragma once
-    
-    #include "CoreMinimal.h"
-    #include "GameFramework/GameModeBase.h"
-    #include "GameLiftUnrealAppGameMode.generated.h"
-    
-    struct FProcessParameters;
-    
-    DECLARE_LOG_CATEGORY_EXTERN(GameServerLog, Log, All);
-    
-    UCLASS(minimalapi)
-    class AGameLiftUnrealAppGameMode : public AGameModeBase
-    {
-        GENERATED_BODY()
-    
-    public:
-        AGameLiftUnrealAppGameMode();
-    
-    protected:
-        virtual void BeginPlay() override;
-    
-    private:
-        void InitGameLift();
-    
-    private:
-        TSharedPtr<FProcessParameters> ProcessParameters;
-    }; 
-
-  4. Open the related source file `[project-name]GameMode.cpp` file (for example `GameLiftUnrealAppGameMode.cpp`). Change the code to align with the following example code. Be sure to replace "GameLiftUnrealApp" with your own project name. These updates are specific to the game server; we recommend that you make a backup copy of the original file for use with your client.
-
-The following example code shows how to add the minimum required elements for server integration with Amazon GameLift Servers:
-
-     * Initialize an Amazon GameLift Servers API client. The `InitSDK()` call with server parameters is required for an Amazon GameLift Servers Anywhere fleet. When you connect to an Anywhere fleet, the plugin stores the server parameters as console arguments The sample code can access the values at runtime. 
-
-     * Implement required callback functions to respond to requests from the Amazon GameLift Servers service, including `OnStartGameSession`, `OnProcessTerminate`, and `onHealthCheck`.
-
-     * Call `ProcessReady()` with a designated port to notify the Amazon GameLift Servers service when ready to host game sessions.
-
-
-
-    
-    
-    // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
-    // SPDX-License-Identifier: Apache-2.0
-    
-    #include "GameLiftUnrealAppGameMode.h"
-    
-    #include "UObject/ConstructorHelpers.h"
-    #include "Kismet/GameplayStatics.h"
-    
-    #if WITH_GAMELIFT
-    #include "GameLiftServerSDK.h"
-    #include "GameLiftServerSDKModels.h"
-    #endif
-    
-    #include "GenericPlatform/GenericPlatformOutputDevices.h"
-    
-    DEFINE_LOG_CATEGORY(GameServerLog);
-    
-    AGameLiftUnrealAppGameMode::AGameLiftUnrealAppGameMode() :
-        ProcessParameters(nullptr)
-    {
-        // Set default pawn class to our Blueprinted character
-        static ConstructorHelpers::FClassFinder<APawn> PlayerPawnBPClass(TEXT("/Game/ThirdPerson/Blueprints/BP_ThirdPersonCharacter"));
-    
-        if (PlayerPawnBPClass.Class != NULL)
-        {
-            DefaultPawnClass = PlayerPawnBPClass.Class;
-        }
-    
-        UE_LOG(GameServerLog, Log, TEXT("Initializing AGameLiftUnrealAppGameMode..."));
-    }
-    
-    void AGameLiftUnrealAppGameMode::BeginPlay()
-    {
-        Super::BeginPlay();
-    
-    #if WITH_GAMELIFT
-        InitGameLift();
-    #endif
-    }
-    
-    void AGameLiftUnrealAppGameMode::InitGameLift()
-    {
-    #if WITH_GAMELIFT
-        UE_LOG(GameServerLog, Log, TEXT("Calling InitGameLift..."));
-    
-        // Getting the module first.
-        FGameLiftServerSDKModule* GameLiftSdkModule = &FModuleManager::LoadModuleChecked<FGameLiftServerSDKModule>(FName("GameLiftServerSDK"));
-    
-        //Define the server parameters for a GameLift Anywhere fleet. These are not needed for a GameLift managed EC2 fleet.
-        FServerParameters ServerParametersForAnywhere;
-    
-        bool bIsAnywhereActive = false;
-        if (FParse::Param(FCommandLine::Get(), TEXT("glAnywhere")))
-        {
-            bIsAnywhereActive = true;
-        }
-    
-        if (bIsAnywhereActive)
-        {
-            UE_LOG(GameServerLog, Log, TEXT("Configuring server parameters for Anywhere..."));
-    
-            // If GameLift Anywhere is enabled, parse command line arguments and pass them in the ServerParameters object.
-            FString glAnywhereWebSocketUrl = "";
-            if (FParse::Value(FCommandLine::Get(), TEXT("glAnywhereWebSocketUrl="), glAnywhereWebSocketUrl))
-            {
-                ServerParametersForAnywhere.m_webSocketUrl = TCHAR_TO_UTF8(*glAnywhereWebSocketUrl);
-            }
-    
-            FString glAnywhereFleetId = "";
-            if (FParse::Value(FCommandLine::Get(), TEXT("glAnywhereFleetId="), glAnywhereFleetId))
-            {
-                ServerParametersForAnywhere.m_fleetId = TCHAR_TO_UTF8(*glAnywhereFleetId);
-            }
-    
-            FString glAnywhereProcessId = "";
-            if (FParse::Value(FCommandLine::Get(), TEXT("glAnywhereProcessId="), glAnywhereProcessId))
-            {
-                ServerParametersForAnywhere.m_processId = TCHAR_TO_UTF8(*glAnywhereProcessId);
-            }
-            else
-            {
-                // If no ProcessId is passed as a command line argument, generate a randomized unique string.
-                FString TimeString = FString::FromInt(std::time(nullptr));
-                FString ProcessId = "ProcessId_" + TimeString;
-                ServerParametersForAnywhere.m_processId = TCHAR_TO_UTF8(*ProcessId);
-            }
-    
-            FString glAnywhereHostId = "";
-            if (FParse::Value(FCommandLine::Get(), TEXT("glAnywhereHostId="), glAnywhereHostId))
-            {
-                ServerParametersForAnywhere.m_hostId = TCHAR_TO_UTF8(*glAnywhereHostId);
-            }
-    
-            FString glAnywhereAuthToken = "";
-            if (FParse::Value(FCommandLine::Get(), TEXT("glAnywhereAuthToken="), glAnywhereAuthToken))
-            {
-                ServerParametersForAnywhere.m_authToken = TCHAR_TO_UTF8(*glAnywhereAuthToken);
-            }
-    
-            FString glAnywhereAwsRegion = "";
-            if (FParse::Value(FCommandLine::Get(), TEXT("glAnywhereAwsRegion="), glAnywhereAwsRegion))
-            {
-                ServerParametersForAnywhere.m_awsRegion = TCHAR_TO_UTF8(*glAnywhereAwsRegion);
-            }
-    
-            FString glAnywhereAccessKey = "";
-            if (FParse::Value(FCommandLine::Get(), TEXT("glAnywhereAccessKey="), glAnywhereAccessKey))
-            {
-                ServerParametersForAnywhere.m_accessKey = TCHAR_TO_UTF8(*glAnywhereAccessKey);
-            }
-    
-            FString glAnywhereSecretKey = "";
-            if (FParse::Value(FCommandLine::Get(), TEXT("glAnywhereSecretKey="), glAnywhereSecretKey))
-            {
-                ServerParametersForAnywhere.m_secretKey = TCHAR_TO_UTF8(*glAnywhereSecretKey);