Plugin Documentation

StepFlow
AWS Step Functions for Blueprints and C++

Start, follow and stop serverless workflows from your game, run Express workflows synchronously, read execution histories, manage state machines, versions and aliases, and let the game itself work as an activity worker with task tokens and heartbeats. Built on the official AWS SDK for C++.

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

Overview

AWS Step Functions runs multi-step workflows — reward pipelines, match result processing, moderation, crafting queues, account deletion, AI chains — as state machines on AWS. StepFlow connects Unreal Engine 4.27 and 5.8 to it. Every request runs on a background worker thread with automatic retries; every result arrives back on the game thread.

  • Start Execution, Run Execution (start + wait) and Wait For Execution with progress pins and a timeout.
  • Start Sync Execution: Express workflows in one call, with output, error / cause and billed duration / memory.
  • Describe, stop, list (status / redrive filters, paging) and redrive executions; full execution history with typed events, state timeline and error extraction.
  • State machines: list, describe, create, update, delete, validate definitions on the service, versions and aliases.
  • Activities and callbacks: the StepFlow Activity Worker component long-polls tasks in the background and answers them with Send Task Success / Failure, with automatic heartbeats; task tokens from waitForTaskToken integrations work too.
  • Distributed Map runs: list, describe and update.
  • ARN builders and parsers, execution name and trace header helpers, JSON helpers.

Requirements

RequirementDetails
Unreal Engine4.27 and 5.8
PlatformsWin64, Linux and Android
ModulesStepFlow (Runtime), StepFlowSdk (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. Step Functions and Cognito usage is billed by AWS.

Installation

  1. Install StepFlow from Fab into your engine, or copy the StepFlow folder into your project's Plugins folder.
  2. Enable StepFlow in Edit > Plugins and restart the editor.
  3. Open Project Settings > Plugins > StepFlow and set Region, Identity Pool Id and (optional, recommended) Account Id and Default State Machine Arn.
  4. C++ only: add PublicDependencyModuleNames.Add("StepFlow"); to your Build.cs.
Plain names instead of ARNsWith the Account Id set, every node accepts QuestRewards where it would need arn:aws:states:us-east-1:123456789012:stateMachine:QuestRewards; empty State Machine pins use the Default State Machine Arn.
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. Create your state machine in the Step Functions console (Standard for long, durable workflows; Express for short, high-volume ones you want to run synchronously). Note its ARN.
  2. For an activity worker, create an activity (console or Create Activity) and use it in a Task state: "Resource": "arn:aws:states:us-east-1:123456789012:activity:CraftItem". Add "HeartbeatSeconds" if tasks may take long.
  3. In Amazon Cognito create an identity pool (guest access if players may act before signing in, plus your identity providers).
  4. Give the pool's player role only what the game needs. Least-privilege player policy:
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "RunGameWorkflows",
      "Effect": "Allow",
      "Action": ["states:StartExecution", "states:StartSyncExecution"],
      "Resource": "arn:aws:states:us-east-1:123456789012:stateMachine:mygame-*"
    },
    {
      "Sid": "FollowGameExecutions",
      "Effect": "Allow",
      "Action": ["states:DescribeExecution", "states:GetExecutionHistory", "states:StopExecution"],
      "Resource": "arn:aws:states:us-east-1:123456789012:execution:mygame-*:*"
    },
    {
      "Sid": "ActivityWorker",
      "Effect": "Allow",
      "Action": ["states:GetActivityTask"],
      "Resource": "arn:aws:states:us-east-1:123456789012:activity:mygame-*"
    },
    {
      "Sid": "AnswerTasks",
      "Effect": "Allow",
      "Action": ["states:SendTaskSuccess", "states:SendTaskFailure", "states:SendTaskHeartbeat"],
      "Resource": "*"
    }
  ]
}

Answers to callback (waitForTaskToken) tasks are not tied to an ARN, so the task-token actions usually need "Resource": "*"; if the game only answers activity tasks you can limit them to the activity ARNs. Only grant them to roles that really answer tasks (often a server role, not the guest role). For Express executions use the express: resource type in the execution ARN (...:express:mygame-*:*:*).

Admin nodes (Create / Update / Delete State Machine, Publish State Machine Version, Create / Delete Activity, Update Map Run, Redrive Execution, List State Machines / Activities, Validate State Machine Definition) need states:CreateStateMachine, states:UpdateStateMachine, states:DeleteStateMachine, states:PublishStateMachineVersion, states:CreateActivity, states:DeleteActivity, states:UpdateMapRun, states:RedriveExecution, states:List*, states:Describe*, states:ValidateStateMachineDefinition and iam:PassRole on the workflow role. Use them in tools, editor utilities and dedicated servers — not in player roles.

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

Quick start

Run a workflow and use its result

  1. Build the input: Make JSON Object with playerId = Get Identity Id, questId = Q42.
  2. Call Run Execution with State Machine mygame-QuestRewards (or empty for the default) and that input.
  3. On Polled fires after every check (show a spinner, read Execution > Status).
  4. On Succeeded: Get JSON Field on Execution > Output with Path rewards[0].itemId, or JSON To Struct into your reward struct.
  5. On Failed: Error > Code is the workflow error (for example States.TaskFailed) or an API error; Error > Message the cause.

Express workflow, one call

Start Sync Execution runs an Express state machine and returns its output in the same node (up to 5 minutes). Check Result > Status: Succeeded, Failed or Timed Out. Billed Duration Ms and Billed Memory MB show what AWS charges.

Inspect what happened

Get Execution History returns every event; feed it to Get State Timeline for per-state durations, Get Last Error And Cause to find the state that failed, or Get State Output to read one state's result.

Activity worker

An activity is a Task state whose work is done by an outside worker — here, your game or dedicated server (spawn an NPC event, run a simulation, grant items that only the server may grant, ask a human moderator in a tool).

  1. Add the StepFlow Activity Worker component to an actor (Game Mode on a server, or any actor). Set Activity (ARN or name), optionally Auto Start, Max Pending Tasks and Auto Heartbeat Interval.
  2. Call Start Worker. The component long-polls GetActivityTask on a background thread (each poll waits up to 60 seconds on AWS; the game thread is never blocked).
  3. On Task Received gives the task token and JSON input. Do the work, then call Complete Current Task with a JSON output, or Fail Current Task with an error name (match it in the state's Catch / Retry) and a cause.
  4. While Max Pending Tasks tasks are unanswered the worker pauses polling (Waiting) and resumes after an answer.
  5. With Auto Heartbeat Interval > 0 the component sends heartbeats for every pending task; a task that timed out on AWS fires On Task Lost and is removed.
StoppingStop Worker stops polling at once on Linux and Android; on Windows a poll that is already waiting on AWS ends by itself (within 60 seconds) and the state stays Stopping until then. A task that this last poll still brings is delivered normally. The long poll occupies one of the plugin's worker threads, so keep Worker Threads above the number of running workers.

Callback tasks: for .waitForTaskToken integrations (Lambda, SQS, EventBridge, ...) pass $$.Task.Token to the game in the message, then answer with Send Task Success / Send Task Failure / Send Task Heartbeat (or the component's Complete Task / Fail Task by token).

Node reference (79 nodes)

Latent nodes (Latent) run in the background, can be stopped with Cancel on their return value and fire exactly one final pin on the game thread (Wait For Execution / Run Execution also fire On Polled on the way). Every Error output is an FStepFlowError (Code, Message, Http Status, Retryable). State Machine inputs take an ARN, a version or alias ARN, or a plain name (with Account Id set); empty = Default State Machine Arn.

Executions

NodeKindInputsOutputsPurpose
Start ExecutionLatentState Machine, Input, Name, Trace HeaderOn Success / On Failure (Execution, Error)Starts a workflow and returns its Execution Arn at once.
Start Sync ExecutionLatentState Machine, Input, Name, Trace Header, Include DataOn Completed / On Failure (Result, Error)Runs an Express workflow and returns output, error / cause and billing.
Run ExecutionLatentState Machine, Input, Name, Poll Interval Seconds, Timeout SecondsOn Succeeded / On Failed / On Polled (Execution, Error)Start Execution + Wait For Execution in one node.
Wait For ExecutionLatentExecution Arn, Poll Interval Seconds, Timeout SecondsOn Succeeded / On Failed / On PolledPolls until the execution ends; failures carry the workflow error in Error.
Describe ExecutionLatentExecution Arn, Include DataOn Success / On Failure (Execution, Error)Status, times, input / output, error / cause, redrive status.
Stop ExecutionLatentExecution Arn, Error, CauseOn Success / On Failure (Error)Aborts a running execution.
Redrive ExecutionLatentExecution ArnOn Success / On Failure (Error)Restarts a failed Standard execution from its failed states.
List ExecutionsLatentState Machine, Status Filter, Redrive Filter, Map Run Arn, Max Results, Next TokenOn Success / On Failure (Executions, Next Token, Error)One page of executions, newest first.
Get Execution HistoryLatentExecution Arn, Fetch All, Reverse Order, Include Data, Max Results, Next TokenOn Success / On Failure (Events, Next Token, Error)The typed event log of an execution (all pages by default).
Is Terminal StatusPureStatusBooleanTrue for Succeeded, Failed, Timed Out, Aborted.
Make Unique Execution NameCallablePrefixStringPrefix-yyyyMMdd-HHmmss-random, max 80 chars (idempotent starts).
Is Valid Execution NamePureNameBooleanChecks the AWS naming rules.
Make Trace HeaderCallableSampledStringNew AWS X-Ray trace header for Start Execution.
Get Execution Console UrlPureExecution ArnStringLink to the execution in the AWS console.

History helpers

NodeKindInputsOutputsPurpose
Get Events Of TypePureEvents, Type, ContainsEventsFilters events by type (exact or substring, e.g. "Failed").
Get Last Error And CausePureEventsBoolean, Error, Cause, State NameThe newest failure and the state it happened in.
Get State TimelinePureEventsState VisitsOne entry per state visit with entered / exited times and duration.
Get State OutputPureEvents, State NameBoolean, OutputJSON output of a state's last exit.

State machines

NodeKindInputsOutputsPurpose
List State MachinesLatentMax Results, Next TokenOn Success / On Failure (State Machines, Next Token, Error)The account's state machines in the region.
Describe State MachineLatentState Machine, Include DefinitionOn Success / On Failure (State Machine, Error)Type, status, role, revision, definition.
Describe State Machine For ExecutionLatentExecution ArnOn Success / On Failure (State Machine, Error)The exact definition an execution ran with.
Create State MachineLatent adminName, Definition, Role Arn, Type, Publish, Version DescriptionOn Success / On Failure (State Machine, Error)Creates a state machine (optionally publishing version 1).
Update State MachineLatent adminState Machine, Definition, Role Arn, Publish, Version DescriptionOn Success / On Failure (State Machine, Error)Changes definition / role; returns the new revision.
Delete State MachineLatent adminState MachineOn Success / On Failure (Error)Deletes a state machine.
Validate State Machine DefinitionLatentDefinition, Type, Max ResultsOn Success / On Failure (Validation, Error)Server-side ASL check with errors, warnings and JSON paths.
Publish State Machine VersionLatent adminState Machine, Description, Revision IdOn Success / On Failure (State Machine, Error)Publishes the current revision as a version.
List State Machine VersionsLatentState Machine, Max Results, Next TokenOn Success / On Failure (Versions, Next Token, Error)Published versions with numbers.
List State Machine AliasesLatentState Machine, Max Results, Next TokenOn Success / On Failure (Aliases, Next Token, Error)Aliases of a state machine.
Describe State Machine AliasLatentAlias ArnOn Success / On Failure (Alias, Error)Alias description and version routing weights.

Activities and task tokens

NodeKindInputsOutputsPurpose
Create ActivityLatent adminNameOn Success / On Failure (Activity, Error)Creates (or returns) an activity.
Delete ActivityLatent adminActivityOn Success / On Failure (Error)Deletes an activity.
List ActivitiesLatentMax Results, Next TokenOn Success / On Failure (Activities, Next Token, Error)The account's activities.
Describe ActivityLatentActivityOn Success / On Failure (Activity, Error)Name, ARN, creation time.
Get Activity TaskLatentActivity, Worker NameOn Task / On No Task / On Failure (Task, Error)One long poll (up to 60 s, background thread).
Send Task SuccessLatentTask Token, OutputOn Success / On Failure (Error)Completes a task with JSON output.
Send Task FailureLatentTask Token, Error, CauseOn Success / On Failure (Error)Fails a task with an error name and cause.
Send Task HeartbeatLatentTask TokenOn Success / On Failure (Error)Keeps a long task alive.

Activity worker component

NodeKindInputsOutputsPurpose
Start WorkerCallableActivity Override—Starts background polling.
Stop WorkerCallable——Stops polling; pending tasks stay answerable.
Is RunningPure—BooleanPolling or waiting for answers.
Get Worker StatePure—Stopped / Polling / Waiting / StoppingDetailed state.
Complete Current TaskCallableOutputBooleanAnswers the oldest pending task with success.
Fail Current TaskCallableError, CauseBooleanAnswers the oldest pending task with failure.
Complete TaskCallableTask Token, Output—Answers a task by token.
Fail TaskCallableTask Token, Error, Cause—Fails a task by token.
Hand Off TaskCallableTask TokenBooleanForgets a task you passed to someone else (frees a pending slot).
Get Current Task TokenPure—StringToken of the oldest pending task.
Get Current TaskPure—Boolean, TaskThe oldest pending task.
Get Pending TasksPure—TasksAll unanswered tasks.
Send Heartbeat NowCallable——Heartbeats every pending task.
Set Auto Heartbeat IntervalCallableSeconds—0 = off.
Get StatsPure—Worker StatsReceived / completed / failed, heartbeats, empty polls, errors, uptime.

Events: On Task Received (Task), On Task Answered (Task Token, Delivered, Error), On Task Lost (Task Token, Error), On Worker Error (Error), On Worker Stopped.

Map runs

NodeKindInputsOutputsPurpose
List Map RunsLatentExecution Arn, Max Results, Next TokenOn Success / On Failure (Map Runs, Next Token, Error)Distributed Map runs of an execution.
Describe Map RunLatentMap Run ArnOn Success / On Failure (Map Run, Error)Status, concurrency, tolerance, item / execution counters.
Update Map RunLatent adminMap Run Arn, Max Concurrency, Tolerated Failure Percentage, Tolerated Failure Count (-1 = keep)On Success / On Failure (Error)Tunes a running Map run.

ARNs

NodeKindInputsOutputsPurpose
Make State Machine ArnPureName, Qualifier, Region, Account IdStringBuilds a state machine / version / alias ARN.
Make Activity ArnPureName, Region, Account IdStringBuilds an activity ARN.
Make Execution ArnPureState Machine, Execution Name, ExpressStringARN of a named execution.
Parse ArnPureArnBoolean, PartsPartition, region, account, type, name, qualifier.
Get Name From ArnPureArnStringState machine / activity name.
Get Execution NamePureExecution ArnStringExecution name at the end of the ARN.

Config and identity

NodeKindInputsOutputsPurpose
Set RegionCallableRegion—Region for every following request.
Set Credential ModeCallableMode—Overrides the settings' credential mode.
Set Login TokenCallableProvider, Token—Signs the player in to the identity pool.
Clear Login TokensCallable——Back to guest.
Set Static CredentialsCallableAccess Key Id, Secret Access Key, Session Token—Keys from your backend (Static Keys mode).
Get Identity IdPure—StringCognito identity id of the player.
Make User Pool Provider NamePureRegion, User Pool IdStringLogin key of a Cognito user pool.
Is ConfiguredPure—Boolean, ProblemFalse with a reason when settings are incomplete.
Set Default State MachineCallableState Machine—Runtime override of Default State Machine Arn.
Set Account IdCallableAccount Id—Runtime override of Account Id (plain names).
Resolve IdentityLatentForce RefreshOn Success / On Failure (Identity Id, Error)Fetches credentials now (right after login).
CancelCallable(latent node)—Stops waiting; no pins fire any more.
Is FinishedPure(latent node)BooleanTrue after finish or cancel.

JSON

NodeKindInputsOutputsPurpose
Struct To JSONCallableStructBoolean, JsonAny struct to a JSON object (execution input).
JSON To StructCallableJsonBoolean, Out StructExecution output into a struct.
Get JSON FieldPureJson, PathBoolean, ValueOne value by path such as rewards[0].itemId.
Make JSON ObjectPureFields (map), Parse ValuesStringBuilds an input object from key / value pairs.
Set JSON FieldPureJson, Path, Value, Value Is JsonBoolean, ResultSets a (nested) field and returns the new JSON.

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.
Static KeysDevelopment, dedicated servers, keys from your backendSettings keys or Set Static Credentials (with an optional session token).
Default Credential ChainServers and toolsEnvironment variables, the ~/.aws profile, ECS and EC2 instance roles.

C++ API

// Build.cs: PublicDependencyModuleNames.Add("StepFlow");
#include "StepFlowLibrary.h"

UStepFlowLibrary::StartSyncExecutionNative(TEXT("mygame-ScoreCheck"), TEXT("{\"score\":1200}"),
    FStepFlowNativeSyncDelegate::CreateLambda([](const FStepFlowSyncResult& Result, const FStepFlowError& Error)
    {
        // runs on the game thread; Result.Status, Result.Output, Error.Code
    }));

StartExecutionNative works the same for Standard workflows. The latent node classes (UStepFlowWaitAction and the others) can be created from C++ through their static factory functions; bind the delegates, then call Activate(). The worker is a normal component: UStepFlowActivityWorkerComponent.

Types

TypeKindMembers
FStepFlowExecutionStructExecution Arn, Name, State Machine Arn / Version Arn / Alias Arn, Status, Finished, Input, Output, Error, Cause, Start / Stop Time, Duration Seconds, Map Run Arn, Redrive Count / Status / Reason, Trace Header
FStepFlowSyncResultStructExecution Arn, Name, State Machine Arn, Status, Input, Output, Error, Cause, Start / Stop Time, Duration Seconds, Billed Duration Ms, Billed Memory MB, Trace Header
FStepFlowHistoryEventStructId, Previous Event Id, Type, Timestamp, State Name, Error, Cause, Details Json
FStepFlowStateVisitStructState Name, Entered / Exited Event Id, Entered / Exited Time, Duration Seconds, Exited
FStepFlowStateMachineStructArn, Name, Type, Status, Definition, Role Arn, Description, Label, Revision Id, Version Arn, Creation / Update Time
FStepFlowVersionInfo / FStepFlowAliasInfo / FStepFlowRoutingEntryStructVersion Arn + Number; Alias Arn, Name, Description, Routing (version + weight)
FStepFlowActivity / FStepFlowActivityTaskStructActivity Arn, Name, Creation Time; Task Token, Input, Activity Arn, Worker Name, Received Time, Last Heartbeat Time
FStepFlowWorkerStatsStructTasks Received / Completed / Failed, Heartbeats Sent, Empty Polls, Poll Errors, Uptime Seconds, Last Error
FStepFlowMapRun / FStepFlowMapRunCountsStructMap Run Arn, Execution Arn, Status, times, Max Concurrency, tolerances, Execution / Item Counts (pending, running, succeeded, failed, timed out, aborted, total, ...)
FStepFlowValidation / FStepFlowDiagnosticStructValid, Truncated, Error / Warning Count, Diagnostics (Severity, Code, Message, Location)
FStepFlowArnStructPartition, Service, Region, Account Id, Resource Type, Resource Name, Qualifier
FStepFlowErrorStructCode, Message, Http Status, Retryable
EStepFlowExecutionStatusEnumAny / Unknown, Running, Succeeded, Failed, Timed Out, Aborted, Pending Redrive
EStepFlowStateMachineType / EStepFlowMapRunStatus / EStepFlowRedriveFilter / EStepFlowWorkerState / EStepFlowCredentialModeEnumStandard / Express; Map run states; Any / Redriven / Not Redriven; Stopped / Polling / Waiting / Stopping; credential modes

Settings

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

SettingDefaultDescription
Regionus-east-1Region of your state machines and identity pool.
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.
Access Key Id / Secret Access Key(empty)Static Keys mode - development and servers only.
Allow Static Keys In ShippingOffSettings keys are refused in Shipping builds unless enabled.
Endpoint Override(empty)Custom endpoint such as a local Step Functions emulator.
Request Timeout Ms / Connect Timeout Ms30000 / 5000Time limits of normal requests.
Max Retries3Automatic retries for throttling and transient errors (normal requests).
Worker Threads4Background threads; each running activity poll holds one.
Verify SSL / Log Sdk WarningsOn / OnTLS verification; SDK warnings to LogStepFlow.
Default State Machine Arn(empty)Used by nodes whose State Machine pin is empty.
Account Id(empty)Lets nodes take plain names instead of ARNs.
Activity Worker Name(computer name)Worker name sent with Get Activity Task.
Long Request Timeout Ms310000Timeout of Get Activity Task (60 s long poll) and Start Sync Execution (up to 5 min); no automatic retries, so a workflow is never started twice.
Wait Poll Interval Seconds2Interval of Wait For Execution / Run Execution when the node says 0.

Troubleshooting

Error codeCause and fix
NotConfiguredSet the Identity Pool Id in Project Settings > Plugins > StepFlow, or switch the credential mode.
MissingArnThe State Machine / Execution / Activity pin is empty and no default is set.
InvalidArnA plain name was passed without an Account Id in the settings, or the ARN is malformed. Use Make State Machine Arn.
AccessDeniedExceptionThe role lacks the states: action on that resource (see Setting up AWS).
StateMachineDoesNotExist / ExecutionDoesNotExist / ActivityDoesNotExistWrong name, region or account.
ExecutionAlreadyExistsThe execution name was used before with a different input (names are unique for 90 days). Use Make Unique Execution Name.
StateMachineTypeNotSupportedStart Sync Execution only runs Express state machines.
TaskTimedOut / TaskDoesNotExistThe task expired before the answer (raise TimeoutSeconds / use heartbeats) or was answered already.
TimeoutWait For Execution hit its Timeout Seconds; the execution keeps running on AWS.
UnavailableThe SDK library could not be loaded or the engine is shutting down. Check the Output Log for LogStepFlow 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 for Unreal Engine 4.27 and 5.8.