Plugin Documentation

GameLiftMatch
Amazon GameLift matchmaking for Blueprints and C++

Find matches with FlexMatch, place game sessions through queues, browse and create sessions, measure region latency and travel players to the server — from the game client, with Amazon Cognito credentials, built on the official AWS SDK for C++.

v1.0
UE 4.27 & 5.8
Win64, Linux & Android
Category Networking
Alpha XP

Overview

GameLiftMatch is the game-client side of Amazon GameLift for Unreal Engine 4.27 and 5.8. Players get temporary AWS credentials from a Cognito identity pool and talk to GameLift directly, so a matchmaking flow needs no backend of your own. Requests run on background worker threads with automatic retries; every result arrives on the game thread.

  • Find Match: one node that submits a FlexMatch ticket, reports every status change, asks for acceptance when the rule set needs it and returns the server address with a player session per player.
  • Start Matchmaking, Wait For Match, Accept Match, Stop Matchmaking for full control over tickets and parties.
  • Start Game Session Placement + Wait For Placement: new sessions through queues, steered by player latency.
  • Search Game Sessions, Describe Game Sessions, Create Game Session, Create Player Session: server browsers and direct sessions.
  • Measure Region Latencies: per-region round-trip times, ready to feed into matchmaking and placement.
  • Make Connect URL and Travel To Game Session: join the server with ?PlayerSessionId= in the URL.

Requirements

RequirementDetails
Unreal Engine4.27 and 5.8
PlatformsWin64, Linux and Android
ModulesGameLiftMatch (Runtime), GameLiftMatchSdk (prebuilt AWS SDK for C++ 1.11.916 in Source/ThirdParty)
DependenciesNo other plugins. On Linux and Android the SDK uses the engine's libcurl, OpenSSL and certificate store.
AWSAn AWS account with GameLift fleets running your dedicated server build, plus a matchmaking configuration and/or a game session queue. GameLift and Cognito usage is billed by AWS.

Installation

  1. Install GameLiftMatch from Fab into your engine, or copy the GameLiftMatch folder into your project's Plugins folder.
  2. Enable GameLiftMatch in Edit > Plugins and restart the editor.
  3. Open Project Settings > Plugins > GameLiftMatch and set Region, Identity Pool Id and your defaults (Default Matchmaking Configuration, Default Queue Name, Default Alias Id).
  4. C++ only: add PublicDependencyModuleNames.Add("GameLiftMatch"); to your Build.cs.
Several AWS plugins in one projectEach Alpha XP cloud plugin carries its own copy of the SDK under a plugin-specific name, so they install side by side without conflicts.

Setting up AWS

  1. Upload your dedicated server build and create a fleet (and preferably an alias that points to it) in the GameLift console. Note the home region.
  2. For queue placement: create a game session queue with your fleets or aliases as destinations.
  3. For matchmaking: create a FlexMatch rule set and a matchmaking configuration that uses the queue. Player attributes and latency rules in the rule set must match what the client sends.
  4. In Amazon Cognito create an identity pool. Enable guest access if players may matchmake before signing in, and add your identity providers (for example a Cognito user pool).
  5. Attach a policy to the IAM role the pool gives to players (authenticated and/or guest) that allows only the GameLift actions the client uses:
{
  "Version": "2012-10-17",
  "Statement": [{
    "Effect": "Allow",
    "Action": [
      "gamelift:StartMatchmaking",
      "gamelift:DescribeMatchmaking",
      "gamelift:StopMatchmaking",
      "gamelift:AcceptMatch",
      "gamelift:StartGameSessionPlacement",
      "gamelift:DescribeGameSessionPlacement",
      "gamelift:StopGameSessionPlacement",
      "gamelift:SearchGameSessions",
      "gamelift:DescribeGameSessions",
      "gamelift:CreateGameSession",
      "gamelift:CreatePlayerSession"
    ],
    "Resource": "*"
  }]
}

Remove every action your game does not call. Many games only need the first four (FlexMatch) or the placement actions. CreateGameSession and CreatePlayerSession are only needed for direct sessions and server browsers. Where IAM supports resource-level permissions, you can narrow StartMatchmaking to your matchmaking configuration ARN, StartGameSessionPlacement to your queue ARN and CreateGameSession to your fleet or alias ARN. Check the GameLift entry of the IAM service authorization reference before you narrow a statement.

Never ship access keysStatic keys in the settings end up in DefaultGame.ini and in packaged games. Use them only for development; players should always use the identity pool. Shipping builds refuse settings keys unless Allow Static Keys In Shipping is enabled.

Game server side

GameLiftMatch is the client half. A player session id only reserves a slot. Your dedicated server process on the fleet must validate every connecting player. Read PlayerSessionId from the login options (for example in AGameModeBase::PreLogin with UGameplayStatics::ParseOption). Call GameLift's server-side AcceptPlayerSession with it and reject the login if that call fails. When the player leaves, call RemovePlayerSession. A reserved slot that is not accepted within 60 seconds lapses.

Do not trust the clientWithout server-side validation anyone who knows the IP address and port can join. Matchmaker data and player data are readable by the server from the game session and player session, so the server never needs to trust values sent by the client.

Quick start

FlexMatch in one node

  1. On Begin Play call Measure Region Latencies (Regions empty = the settings list) and keep Latencies.
  2. Call Find Match with the latencies. Leave Players empty for a solo player whose id is the Cognito identity id, or fill in one GameLiftMatch Player per party member with attributes such as skill (Number).
  3. On Status Changed: show Ticket.Status and Estimated Wait Seconds.
  4. On Requires Acceptance (only when the rule set asks for acceptance): show a dialog, then call Accept Match with Ticket.TicketId.
  5. On Matched: call Travel To Game Session with Ticket.Connection.
  6. On Failed: show Error.Message. To leave the queue, call Cancel on the node's return value; Find Match then also stops the ticket on AWS.

Queue placement

Start Game Session Placement (Max Players, Latencies) → Wait For Placement with Placement.PlacementId → On Placed → Travel To Game Session with Placement.Connection.

Server browser

Search Game Sessions with Filter hasAvailablePlayerSessions=true and Sort playerSessionCount DESC → list the sessions → Create Player Session with the chosen GameSessionId → Travel To Game Session with the returned connection.

Matchmaking nodes

All latent nodes run in the background, can be stopped with Cancel on their return value and fire exactly one final pin on the game thread.

NodeInputsOutputsDescription
Find MatchConfiguration Name, Players, Latencies, Poll Interval, Max Wait SecondsOn Status Changed, On Requires Acceptance (not final); On Matched / On Failed (Ticket, Error)Start Matchmaking + Wait For Match. Cancel (or the wait limit) also stops the ticket on AWS.
Start MatchmakingConfiguration Name, Players, Latencies, Ticket IdOn Success / On Failure (Ticket, Error)Submits a ticket (status Queued). Configuration Name empty = the settings default. Players empty = one player with the identity id. Players without their own Latency Ms get Latencies.
Wait For MatchTicket Id, Poll Interval, Max Wait Seconds, Stop Ticket On CancelOn Status Changed, On Requires Acceptance; On Matched / On FailedChecks the ticket every Poll Interval seconds until it is Completed, Failed, Cancelled or Timed Out. Transient request errors are retried up to 5 times in a row.
Accept MatchTicket Id, Player Ids, AcceptOn Success / On Failure (Error)Accepts or rejects a proposed match. Player Ids empty = this player's identity id.
Stop MatchmakingTicket IdOn Success / On Failure (Error)Cancels the ticket; a running Wait For Match then reports Cancelled.
Poll intervalTicket and placement status is read with DescribeMatchmaking / DescribeGameSessionPlacement. The default interval is 10 seconds, the rate AWS recommends for polling clients. Shorter intervals work but count against your account's request rate.

Placement nodes

NodeInputsOutputsDescription
Start Game Session PlacementQueue Name, Max Players, Game Session Name, Game Properties, Players, Latencies, Placement Id, Game Session DataOn Success / On Failure (Placement, Error)Asks a queue for a new game session (status Pending). Each player gets a reserved slot and reports their latencies so the queue picks the best region. Placement Id empty = a new GUID.
Wait For PlacementPlacement Id, Poll Interval, Max Wait Seconds, Stop Placement On CancelOn Placed / On Failed (Placement, Error)Checks the placement until it is Fulfilled (Placement.Connection is filled) or Cancelled, Timed Out or Failed.
Stop Game Session PlacementPlacement IdOn Success / On Failure (Placement, Error)Cancels a pending placement.

Session nodes

Fleet Id / Alias Id empty = the settings' Default Alias Id, then Default Fleet Id. When both are given, the fleet wins.

NodeInputsOutputsDescription
Search Game SessionsFilter Expression, Sort Expression, Next Token, Fleet Id, Alias Id, Location, LimitOn Success / On Failure (Sessions, Next Token, Error)Active sessions of a fleet or alias, for example filter hasAvailablePlayerSessions=true AND gameSessionProperties.mode = 'ctf'. At most 20 per page; pass Next Token for the next page.
Describe Game SessionsGame Session Id, Status Filter, Next Token, Fleet Id, Alias Id, Location, LimitOn Success / On Failure (Sessions, Next Token, Error)One session by id, or all sessions of a fleet or alias (Status Filter ACTIVE, ACTIVATING, TERMINATING or TERMINATED).
Create Game SessionMax Players, Name, Game Properties, Fleet Id, Alias Id, Location, Game Session Data, Idempotency Token, Wait Until ActiveOn Success / On Failure (Session, Error)Starts a session directly on a fleet. With Wait Until Active (default) On Success fires once the server activated it (checked every 2 s, up to 300 s). The creator id is the player's identity id, which lets a resource creation limit policy cap sessions per player.
Create Player SessionGame Session Id, Player Id, Player DataOn Success / On Failure (Connection, Error)Reserves a slot in an active session and returns its address with the new player session. Player Id empty = the identity id.

Functions

NodeDescription
Make Connect URLBuilds host:port?PlayerSessionId=psess-... from a connection, plus Extra Options such as Name=Alice. Uses the DNS name when there is one (required on fleets with TLS certificates), otherwise the IP address. Player Id picks the player session (empty = this player, else the first).
Travel To Game SessionMake Connect URL + ClientTravel on the given player controller. Returns false and logs a warning when there is no address.
Get Best RegionThe fastest region of a latency map and its milliseconds.
Set RegionSwitches the AWS region for every following request.
Set Credential ModeOverrides the credential mode from the settings at runtime.
Set Login TokenSigns the player in to the identity pool with a provider token (Cognito user pool, Google, Apple, Facebook, OpenID).
Clear Login TokensForgets all login tokens and the cached identity; the player becomes a guest.
Set Static CredentialsUses the given keys from now on (Static Keys mode), for example temporary keys handed out by your backend.
Get Identity IdThe player's Cognito identity id, also the default player id; empty until credentials were resolved once.
Make User Pool Provider NameBuilds the login key of a Cognito user pool: cognito-idp.<region>.amazonaws.com/<pool id>.
Is ConfiguredReturns false and a reason when the settings are incomplete.
Resolve IdentityLatent: fetches the identity and credentials now (for example right after login), so the player id is known before matchmaking.
CancelOn a latent node's return value: none of its pins fire any more.
Is FinishedOn a latent node's return value: true after it finished or was cancelled.

Region latency

Measure Region Latencies opens Samples TCP connections (default 3) to gamelift.<region>.amazonaws.com:443 for every region at the same time. It returns the average connect time in milliseconds, sorted fastest first, plus Best Region and the Failed Regions that did not answer within Timeout Seconds. It uses the engine's socket layer, so it works the same on Win64, Linux and Android. Regions empty = the settings' Latency Regions. List the regions and locations where your fleets run. The host pattern and port are in the advanced settings, so you can point them at your own endpoints.

FlexMatch only places a match in regions for which every player reported a latency. If your rule set has a latency rule, players without latencies are never matched.

Credentials

ModeUse forHow
Cognito Identity PoolGame clientsGuests get unauthenticated credentials; after Set Login Token the player gets the authenticated role. Credentials refresh automatically before they expire. Guest identities are remembered across restarts.
Static KeysDevelopment, keys from your backendSettings keys or Set Static Credentials (with an optional session token). There is no identity id, so set Player Id explicitly.
Default Credential ChainTools and test harnessesEnvironment variables, the ~/.aws profile, ECS and EC2 instance roles.

Player ids are the Cognito identity id by default. They are stable per signed-in user and per device for guests. This means the server can trust the id it sees in the player session.

C++ API

// Build.cs: PublicDependencyModuleNames.Add("GameLiftMatch");
#include "GameLiftMatchAsyncActions.h"
#include "GameLiftMatchLibrary.h"

UGameLiftMatchFindMatchAction* Find = UGameLiftMatchFindMatchAction::FindMatch(this, TEXT("MyConfig"),
    TArray<FGameLiftMatchPlayer>(), Latencies);
Find->OnMatched.AddDynamic(this, &UMyMenuWidget::HandleMatched);   // UFUNCTION(const FGameLiftMatchTicket&, const FGameLiftMatchError&)
Find->OnFailed.AddDynamic(this, &UMyMenuWidget::HandleFailed);
Find->Activate();

void UMyMenuWidget::HandleMatched(const FGameLiftMatchTicket& Ticket, const FGameLiftMatchError& Error)
{
    FString Url;
    UGameLiftMatchLibrary::TravelToGameSession(GetOwningPlayer(), Ticket.Connection, FString(), {}, Url);
}

Every latent node class (UGameLiftMatch...Action) works the same way: call the static factory, bind the dynamic delegates, then call Activate(). Results always arrive on the game thread.

Types

TypeKindMembers
FGameLiftMatchPlayerStructPlayer Id, Team, Attributes (name → Attribute), Latency Ms (region → ms), Player Data
FGameLiftMatchAttributeStructType (String, Number, String List, String Number Map), String Value, Number Value, String List, Number Map
FGameLiftMatchLatencyMapStructValues (region → ms)
FGameLiftMatchTicketStructTicket Id, Configuration Name, Status, Status Reason, Status Message, Estimated Wait Seconds, Player Ids, Connection
FGameLiftMatchPlacementStructPlacement Id, Queue Name, Status, Game Session Name, Connection
FGameLiftMatchConnectionStructGame Session Id (ARN), Ip Address, Dns Name, Port, Region, Player Sessions
FGameLiftMatchPlayerSessionStructPlayer Id, Player Session Id
FGameLiftMatchGameSessionStructGame Session Id, Name, Fleet Id, Status, Current Players, Max Players, Accepts New Players, Ip Address, Dns Name, Port, Location, Creator Id, Game Properties, Game Session Data
FGameLiftMatchErrorStructCode, Message, Http Status, Retryable
EGameLiftMatchTicketStatusEnumUnknown, Queued, Searching, Requires Acceptance, Placing, Completed, Failed, Cancelled, Timed Out
EGameLiftMatchPlacementStatusEnumUnknown, Pending, Fulfilled, Cancelled, Timed Out, Failed
EGameLiftMatchSessionStatusEnumUnknown, Active, Activating, Terminated, Terminating, Error
EGameLiftMatchAttributeTypeEnumString, Number, String List, String Number Map
EGameLiftMatchCredentialModeEnumCognito Identity Pool, Static Keys, Default Credential Chain

Settings

Project Settings > Plugins > GameLiftMatch (saved to DefaultGame.ini). Changes apply to the next request.

SettingDefaultDescription
Regionus-east-1Home region of your fleets, queues and matchmaking configurations.
Credential ModeCognito Identity PoolCognito Identity Pool, Static Keys or Default Credential Chain.
Identity Pool Id(empty)For example us-east-1:01234567-89ab-cdef-0123-456789abcdef.
Allow Guest AccessOnUnauthenticated identities before Set Login Token. The pool must allow guest access too.
Access Key Id / Secret Access Key(empty)Static Keys mode. Saved in DefaultGame.ini - development only.
Allow Static Keys In ShippingOffStatic keys from the settings are refused in Shipping builds unless enabled.
Endpoint Override(empty)Custom endpoint, for example a local test service.
Request Timeout Ms / Connect Timeout Ms30000 / 5000Time limits per request.
Max Retries3Automatic retries with exponential back-off for throttling and transient errors.
Worker Threads4Background threads that run requests and latency measurements.
Verify SSLOnOnly disable for a local test service.
Log Sdk WarningsOnForwards SDK warnings and errors to LogGameLiftMatch.
Default Matchmaking Configuration(empty)Used when Start Matchmaking / Find Match leave Configuration Name empty.
Default Queue Name(empty)Used when Start Game Session Placement leaves Queue Name empty.
Default Fleet Id / Default Alias Id(empty)Used by the session nodes when neither Fleet Id nor Alias Id is given; the alias wins.
Poll Interval Seconds10Seconds between status checks of Wait For Match, Find Match and Wait For Placement (1 to 60).
Latency Regions15 regionsRegions measured when Measure Region Latencies gets no list.
Latency Host Format / Latency Portgamelift.{region}.amazonaws.com / 443Where latency is measured; {region} is replaced by the region name.

Troubleshooting

Error codeCause and fix
NotConfiguredIdentity Pool Id, matchmaking configuration, queue or fleet/alias is missing. Set it on the node or in Project Settings > Plugins > GameLiftMatch.
AccessDeniedExceptionThe identity pool role lacks the gamelift action. Update the role policy (see Setting up AWS).
InvalidRequestExceptionFor example a player attribute whose type does not match the rule set, a duplicate player id or an unknown region in the latencies. The message says which.
NotFoundExceptionWrong configuration, queue, fleet, alias or session id, or a different Region than the resource's home region.
MatchmakingTimedOutNo match within the configuration's request timeout. Relax the rule set or report latencies for more regions.
MatchmakingCancelledThe ticket was stopped, or a player rejected (or did not accept) the proposed match.
PlacementTimedOutNo fleet in the queue had room in time. Check fleet capacity and the queue's destinations.
GameSessionFullException / InvalidGameSessionStatusExceptionCreate Player Session on a full or not yet active session. Create Game Session with Wait Until Active avoids the second one.
NoPlayerIdStatic Keys or Default Chain mode has no identity id; set Player Id on every player.
WaitLimitMax Wait Seconds was reached before the ticket or placement ended.
UnavailableThe SDK library could not be loaded or the engine is shutting down. Check the Output Log for LogGameLiftMatch errors.

Credits

© 2026 Alpha XP — alphaxp.net · Support: support@alphaxp.net. Includes the AWS SDK for C++ and the AWS Common Runtime (Apache License 2.0). Built and verified warning-free for Unreal Engine 4.27 and 5.8.