Instance Provisioning

Loxtep runs on a control-plane / data-plane split. Loxtep operates the control plane (auth, orchestration, activity history, the platform UI); your data workflows run on a data plane whose location depends on the Instance type you choose.

The following diagram shows how the control plane connects to the three data-plane options:

┌─────────────────────────────────────────────────────────┐
│  Control Plane (Loxtep-operated, all instance types)    │
│  • Authentication (Cognito, OAuth 2.1 + PKCE)           │
│  • Orchestration, triggers, scheduling                  │
│  • Activity history + audit                             │
│  • Slim Platform UI (users, billing, usage)             │
│  • MCP server (mcp.loxtep.io)                           │
│  • API Gateway + authorizer                             │
└──────────────────────────┬──────────────────────────────┘
                           │
           ┌────────────────┼────────────────┐
           │                │                │
           ▼                ▼                ▼
┌──────────────┐  ┌──────────────┐  ┌──────────────────┐
│  Shared      │  │  Managed     │  │  Self-Hosted     │
│  (free)      │  │  (paid)      │  │  (your AWS acct) │
│              │  │              │  │                   │
│  Multi-      │  │  Dedicated   │  │  Cross-account   │
│  tenant      │  │  Loxtep      │  │  role +          │
│  Loxtep      │  │  infra       │  │  BusInstall      │
│  infra       │  │              │  │                   │
└──────────────┘  └──────────────┘  └──────────────────┘

Choosing an instance type

TypeData plane locationWho pays AWSBest for
SharedLoxtep multi-tenantLoxtepTrying Loxtep, demos, low-volume workloads
ManagedDedicated Loxtep account, isolated stackLoxtep (you pay Loxtep subscription)Production teams that don't want to touch AWS
Self-HostedYour AWS accountYou, directly to AWSData sovereignty, compliance, existing AWS footprint, custom networking

All three are provisioned with the same MCP operation, loxtep_workspace → create_instance; the difference is which account the rstreams stack lands in and which fields the call requires.

The simplest provisioning call creates a shared instance with just a name and region. The loxtep CLI uses the session from loxtep login. See the CLI reference.

# Provision a shared instance (no AWS account or payment method needed)
loxtep instances create --name demo --region us-east-1 --type shared

Provisioning operations (all instance types)

Each operation is on the loxtep_workspace MCP facade. The CLI column lists the matching loxtep command where one exists.

OperationCLIPurpose
get_deployment_urlsloxtep instances deployment-urlsOne-click, CLI, Terraform, and template download for LoxtepCrossAccountDeploymentRole, plus the external ID
register_infrastructureloxtep instances register --cross-account-role-arn <arn>Record one account. The CLI sends cross_account_role_arn and an optional region; explicit tier ARNs go through register_infrastructure. A call with only RoleArn as cross_account_role_arn stores that ARN as meter_role_arn, bus_lifecycle_role_arn, and workflow_deploy_role_arn on the cross_account_roles entry whose arn equals that RoleArn, when that entry's meter and bus ARNs are empty or already that RoleArn, and sets control_plane_attached. Other entries in the same AWS account keep their tier fields. A stored meter or bus ARN on that entry that differs returns 409 tier_role_conflict and writes nothing. At most 32 accounts.
get_infrastructureloxtep instances registrationList cross_account_roles. An empty list means none. cross_account_role_arn is the first account key.
create_instanceloxtep instances create (shared)Create an instance of any type (shared / managed / self-hosted)
update_instanceloxtep instances update <instance_id>Rename an instance, change connector networks, or reapply the runtimes stack (force_runtimes_redeploy: true)

Shared instance

Why: Fastest path — no AWS account, no payment method, no role. The instance lands on Loxtep's shared multi-tenant rstreams stack. Good for evaluating Loxtep or running low-volume workflows.

Create a shared instance by calling create_instance with instance_type: "shared":

{
  "operation": "create_instance",
  "name": "My shared instance",
  "region": "us-east-1",
  "instance_type": "shared"
}

Required fields:

  • instance_type: "shared"
  • name, region

Unpaid shared omits plan_id (or sends free). Paid starter stays on shared and returns Complete Stripe Checkout to begin provisioning. Do not send api_url, stack_id, observe_api.namespace, observe_api.observe_proxy_role_arn, metadata.routing, or plan metadata (metadata.subscription, tier, plan_id, limits, subscription_details). Shared instances also refuse observe_api role and secret coordinates. The provisioner assigns the org to the shared {env}-shared rstreams stack and returns within seconds.

The frontend's Shared Core option in the instance-create dialog maps to this path.


Managed instance

Why: A dedicated rstreams stack in a Loxtep-owned account, isolated from other tenants. You pay Loxtep a subscription; Loxtep owns the AWS bill. Good for production teams that don't want to manage AWS.

Create a managed instance with create_instance, specifying a plan and the same remote-access observe_api shape as self-hosted:

{
  "operation": "create_instance",
  "name": "Production managed instance",
  "region": "us-east-1",
  "instance_type": "managed",
  "plan_id": "growth",
  "connection_details": {
    "observe_api": {
      "cross_account_role_arn": "arn:aws:iam::123456789012:role/LoxtepCrossAccountDeploymentRole"
    }
  }
}

Required fields (validated in _core/src/validation/organizations-instances-post.ts):

  • instance_type: "managed"
  • plan_id — growth, managed_pro, scale, scale_plus, or max (there is no plain pro plan; the Pro tier's id is managed_pro)
  • A paid plan returns Complete Stripe Checkout to begin provisioning. Provisioning begins after checkout (upfront billing applies).
  • connection_details.observe_api.cross_account_role_arn — IAM role ARN (arn:aws:iam::<12 digits>:role/...). This value is stored on the instance. When it contains :role/ and is not ObserveProxyRole, managed create matches a registered account whose arn or bus_lifecycle_role_arn equals that value. A miss returns 400 Register this AWS account before creating the instance. When both meter and bus are empty on that entry, create succeeds and sets meter_role_arn, bus_lifecycle_role_arn, and workflow_deploy_role_arn on the instance to the entry's arn (workflow uses the stored workflow_deploy_role_arn when present). When both meter and bus are stored, create copies them and, when stored, workflow_deploy_role_arn. Exactly one of meter or bus stored and the other empty returns 400 missing_tier_role before an instance row or payment_pending reservation. details.missing_tiers names the missing tier (meter or bus_lifecycle). The message names that field, for example Missing bus_lifecycle_role_arn for managed instance create. Record the deployment role ARN from the cross-account template. ObserveProxyRole stays on platform credentials and copies no tier ARNs. A later register_infrastructure call that sends meter_role_arn and bus_lifecycle_role_arn records those fields on the cross_account_roles entry whose arn equals the sent cross_account_role_arn, and copies them onto an instance that is not detached, whose candidate ARN is in that AWS account, and whose stored cross_account_role_arn is unset or equals the sent ARN. A detached instance stays unchanged. An instance in that account that names a different cross_account_role_arn stays unchanged. A later register_infrastructure call does not restore bus or workflow ARNs that detach cleared on a detached instance. Other entries in the same AWS account keep their tier fields. When the stored ARN is a remote role, workflow deploy, bot registration, and code upload use workflow_deploy_role_arn when that field is set, and cross_account_role_arn when it is empty. Observe signing uses meter_role_arn, then cross_account_role_arn, then observe_proxy_role_arn. rstreams_secret_arn and rstreams_auth_arn are written by provisioning; callers do not send them. Do not send api_url, stack_id, namespace, observe_proxy_role_arn, or plan metadata. Sending observe_proxy_role_arn is a 400. Sending meter_role_arn on observe_api is 400 Unrecognized key: "meter_role_arn".

The provisioner deploys a dedicated rstreams stack into Loxtep's account (ManagedInstanceProvisioner) and returns within a few minutes. You can monitor through Loxtep's existing CloudWatch dashboards — Loxtep manages them. The runtimes stack also creates the workflow code bucket in that account. See Workflow code bucket.


Self-hosted instance (your AWS account)

Why: The entire rstreams data plane runs in your AWS account. You own the AWS bill, the data residency, and the IAM surface. Good for compliance, regulated industries, or teams with an existing AWS footprint who want to audit the infrastructure directly.

Prerequisites:

  • An AWS account with admin access (or enough IAM permission to create a role via CloudFormation)
  • A Loxtep account, plus a saved payment method (upfront billing applies for self-hosted too — Loxtep charges for the control-plane + management surface, the AWS resources are billed to you directly)

Install flow

Step 1 — Get the deployment URLs + external ID

Retrieve the onboarding package with loxtep_workspace → get_deployment_urls. It takes no arguments; the organization comes from your session:

{ "operation": "get_deployment_urls" }

From the CLI, run:

loxtep instances deployment-urls

The result carries the package in data (unverified):

{
  "success": true,
  "data": {
    "organization_id": "00000000-0000-0000-0000-000000000000",
    "region": "us-east-1",
    "external_id": "loxtep-org-abc12345-ext-...",
    "loxtep_account_id": "123456789012",
    "role_name_suffix": "abcd1234",
    "deployment_role_name": "LoxtepCrossAccountDeploymentRole-abcd1234",
    "deployment_stack_name": "LoxtepCrossAccountRole-abcd1234",
    "deployment_options": {
      "one_click_url": "https://console.aws.amazon.com/cloudformation/...",
      "template_download_url": "https://loxtep-public-templates.s3.amazonaws.com/...",
      "cli_command": "aws cloudformation create-stack ...",
      "terraform_code": "# Loxtep Cross-Account Role (least-privilege) - Terraform"
    },
    "instructions": {
      "quick_start": "Click the one-click URL to deploy via AWS Console",
      "cli": "Use the CLI command for automated deployment",
      "terraform": "Use the Terraform code for infrastructure-as-code deployment",
      "manual": "Download the template and deploy manually"
    },
    "next_steps": [
      "Deploy the cross-account IAM role using your preferred method",
      "Copy the Role ARN from the CloudFormation outputs",
      "Provide the Role ARN to Loxtep via the dashboard or API",
      "Loxtep will deploy your instance within 20-30 minutes"
    ]
  }
}

role_name_suffix is the first 8 characters of the organization id. deployment_role_name is LoxtepCrossAccountDeploymentRole plus that suffix. deployment_stack_name is LoxtepCrossAccountRole plus that suffix. An empty suffix keeps the unsuffixed names. cli_command prints the stack output RoleArn.

get_deployment_urls also writes the generated external_id to organizations.attributes.external_id and mirrors it into Secrets Manager at loxtep/org/{org_id}/external-id. The bus install reads that secret, so this call is mandatory before step 3. This call and the JSON above were not run (unverified).

Step 2 — Deploy the cross-account role

The template creates one role, LoxtepCrossAccountDeploymentRole. The stack output to copy is RoleArn.

  • One-click — open deployment_options.one_click_url and create the stack.
  • CLI — run deployment_options.cli_command. It queries OutputKey==RoleArn.
  • Terraform — apply deployment_options.terraform_code and copy the role_arn output. That snippet does not create LoxtepMaxPermissionsBoundary. A role created from the CloudFormation template still needs the stack update below so the boundary is on the role.
  • Manual — upload deployment_options.template_download_url. Stack name is deployment_stack_name. Copy RoleArn from Outputs.

With a suffix, the role name is deployment_role_name (LoxtepCrossAccountDeploymentRole-{suffix}).

The template does not grant AdministratorAccess. sts:AssumeRole is limited to the Loxtep account and the external ID from step 1. The CloudFormation template attaches LoxtepMaxPermissionsBoundary. That boundary allows the runtimes Lambda to attach to your subnets: ec2:CreateNetworkInterface, ec2:DescribeNetworkInterfaces, ec2:DescribeSubnets, ec2:DeleteNetworkInterface, ec2:AssignPrivateIpAddresses, and ec2:UnassignPrivateIpAddresses. It does not grant ec2:*. The deployment role identity policy allows arn:aws:s3:::org-*, which covers the workflow code bucket. See Connect a data source and Workflow code bucket.

Update an existing cross-account role stack

Update the stack that already created the role before the next bus install. A new stack does not replace the role the instance already uses.

aws cloudformation update-stack \
  --stack-name <existing-cross-account-role-stack> \
  --template-body file://cross-account-role-template.yaml \
  --parameters ParameterKey=LoxtepAccountId,UsePreviousValue=true \
               ParameterKey=ExternalId,UsePreviousValue=true \
               ParameterKey=RoleNameSuffix,UsePreviousValue=true \
  --capabilities CAPABILITY_NAMED_IAM

The bus stack attaches managed policy LoxtepDeployObserveApiInvoke-<stack name> for execute-api:Invoke. The boundary allows iam:AttachRolePolicy and iam:DetachRolePolicy on the deployment role only when iam:PolicyARN is arn:aws:iam::<account>:policy/LoxtepDeployObserveApiInvoke-*. iam:DeleteRolePolicy on the deployment role stays denied. An existing inline policy LoxtepDeploymentRoleObserveApiInvokePolicy is retained (DeletionPolicy Retain). The IAM policy name is <stack name>-deploy-observe-api-invoke. Stack delete leaves that inline policy on the role.

A stack already in ROLLBACK_FAILED or DELETE_FAILED because CloudFormation is deleting that inline policy needs an administrator who is not the deployment role. Use the role name from the RoleArn output when RoleNameSuffix is set.

aws iam delete-role-policy \
  --role-name LoxtepCrossAccountDeploymentRole \
  --policy-name <stack-name>-deploy-observe-api-invoke
aws cloudformation continue-update-rollback --stack-name <bus-stack-name>
aws cloudformation delete-stack --stack-name <bus-stack-name>

continue-update-rollback is for UPDATE_ROLLBACK_FAILED. delete-stack is for ROLLBACK_FAILED and DELETE_FAILED. After the inline policy is gone, run the command that matches the stack status.

If this stack is still the three-role template, the update removes LoxtepMeterRole, LoxtepBusLifecycleRole, and LoxtepWorkflowDeployRole. Record the stack output RoleArn as cross_account_role_arn, meter_role_arn, and bus_lifecycle_role_arn (the same ARN). Send workflow_deploy_role_arn with attach_control_plane: true when workflow deploy should store that field. Do this before relying on the tier fields. A body that sends only cross_account_role_arn records that ARN as meter_role_arn, bus_lifecycle_role_arn, and workflow_deploy_role_arn on the cross_account_roles entry whose arn equals that RoleArn, and sets control_plane_attached to true, when that entry's meter and bus ARNs are empty or already that RoleArn. Other entries in the same AWS account keep their tier fields. A stored meter or bus ARN on that entry that differs returns 409 tier_role_conflict and writes nothing. The in-app download (loxtep-cross-account-role.yaml) is a byte copy of cross-account-role-template.yaml and includes LoxtepMaxPermissionsBoundary. Customers who deployed an older in-app download should update that stack so the role carries the boundary. These commands were not run in a customer account (unverified).

Step 3 — Record the deployment role for each AWS account

Call loxtep_workspace → register_infrastructure once for each remote AWS account. Send the stack output RoleArn as cross_account_role_arn, meter_role_arn, and bus_lifecycle_role_arn (the same ARN). Send workflow_deploy_role_arn with attach_control_plane: true when workflow deploy should store that field. Do this before relying on the tier fields. A body that sends only cross_account_role_arn records that ARN as meter_role_arn, bus_lifecycle_role_arn, and workflow_deploy_role_arn on the cross_account_roles entry whose arn equals that RoleArn, and sets control_plane_attached to true, when that entry's meter and bus ARNs are empty or already that RoleArn. Other entries in the same AWS account keep their tier fields. cross_account_role_arn is the account key. All ARNs in one registration must be the same 12-digit account. The Create Instance dialog Register button sends only cross_account_role_arn. That records the three tier roles on that entry. Entering an ARN that is already registered with both meter_role_arn and bus_lifecycle_role_arn set selects that account without a PUT even when workflow_deploy_role_arn is empty (toast: This instance will use that AWS account.). Entering a registered pre-tier ARN (no meter or bus) registers it again, which fills its tier roles. Entering a registered ARN with only one of meter or bus set also registers it again (PUT). That PUT returns 409 tier_role_conflict if the stored meter or bus ARN differs from the RoleArn. details.fields names the conflicting fields. The message tells the caller to send explicit tier ARNs. Nothing is written.

A body that also sends meter_role_arn, bus_lifecycle_role_arn, workflow_deploy_role_arn, or attach_control_plane uses those fields instead of writing the single RoleArn into every tier. Meter and bus are both required on that path. workflow_deploy_role_arn is stored only when attach_control_plane is true.

Sending the same account key again refreshes that entry. Earlier accounts stay. The organization keeps one external ID in Secrets Manager (loxtep/org/{org_id}/external-id) and shares it with every account. region is optional. When you omit it, the call uses the organization's current preferred_region, or us-east-1.

Register the stage account first (unverified):

{
  "operation": "register_infrastructure",
  "cross_account_role_arn": "arn:aws:iam::123456789012:role/LoxtepCrossAccountDeploymentRole",
  "region": "us-east-1"
}

Then register the production account. The stage account stays on the list (unverified):

{
  "operation": "register_infrastructure",
  "cross_account_role_arn": "arn:aws:iam::987654321098:role/LoxtepCrossAccountDeploymentRole",
  "region": "us-east-1"
}

From the CLI, loxtep instances register records one account with cross_account_role_arn and an optional region. Send explicit tier ARNs (meter_role_arn, bus_lifecycle_role_arn, workflow_deploy_role_arn, attach_control_plane) with register_infrastructure:

loxtep instances register \
  --cross-account-role-arn arn:aws:iam::987654321098:role/LoxtepCrossAccountDeploymentRole \
  --region us-east-1

A body with only cross_account_role_arn that is accepted records meter_role_arn, bus_lifecycle_role_arn, and workflow_deploy_role_arn on the cross_account_roles entry whose arn equals that RoleArn. Other entries in the same AWS account keep their tier fields. It copies those ARNs onto an instance whose connection_details.observe_api candidate is in that account, whose stored cross_account_role_arn is unset or equals the sent ARN, and whose status is not detached. A detached instance stays unchanged. An instance in that account that names a different cross_account_role_arn stays unchanged. A later infrastructure PUT does not restore bus or workflow ARNs that detach cleared on a detached instance. The 409 writes nothing and does not copy. An explicit meter and bus registration writes those stored fields on that same entry, and writes workflow_deploy_role_arn when attach_control_plane is true. The candidate is bus_lifecycle_role_arn, then cross_account_role_arn, then meter_role_arn. The organization row, those instance copies, and the organization-infrastructure-registered event are one database transaction. Bad connection_details JSON, or a candidate ARN that is not an IAM role ARN, returns 500 Cannot copy tier roles onto instance ${instance_id}: ${detail}. error.details.code is instance_tier_copy_failed and error.details.instance_id is that instance id. The transaction rolls back. The organization row and instance rows stay as they were before the call, and the event is not sent.

Tier validation returns 400:

  • meter_role_arn is required when registering tier roles
  • bus_lifecycle_role_arn is required when registering tier roles
  • workflow_deploy_role_arn is required when attach_control_plane is true
  • attach_control_plane must be true to record workflow_deploy_role_arn
  • All role ARNs in one registration must belong to the same AWS account

A 33rd account returns 400 An organization can register at most 32 AWS accounts. A malformed ARN returns 400. An organization id that is not your organization returns 403.

The success payload is on data. cross_account_role_arn in that payload is the account key you just sent. cross_account_roles is the full list. Each entry has arn, account_id, region, registered_at, and, when recorded, meter_role_arn, bus_lifecycle_role_arn, workflow_deploy_role_arn, and control_plane_attached. The stored attributes.cross_account_role_arn stays the first account key. get_infrastructure (CLI loxtep instances registration) returns the same list. An empty cross_account_roles means no account is registered. cross_account_role_arn on get_infrastructure is the first account key, or null when the list is empty.

Send workflow_deploy_role_arn together with attach_control_plane: true when that field should be stored. Use the same RoleArn. Workflow deploy, bot registration, and code upload use cross_account_role_arn when workflow_deploy_role_arn is empty. A registration that sends meter and bus without attach_control_plane: true clears workflow_deploy_role_arn on the cross_account_roles entry whose arn equals the sent cross_account_role_arn, and on instances that receive that copy. Other entries in the same AWS account keep their tier fields. A detached instance stays unchanged, so a later infrastructure PUT does not restore the cleared bus or workflow ARNs on that instance. An instance whose stored cross_account_role_arn is set and differs from the sent ARN stays unchanged.

These calls and the JSON bodies were not run (unverified). get_infrastructure lists every registered account. A listed stage account does not cover production.

Step 4 — Create the self-hosted instance

Create the instance with observe_api.cross_account_role_arn set to the RoleArn from step 3. Leave meter, bus, and workflow fields off the create body. observe_api is .strict(), so meter_role_arn is 400 Unrecognized key: "meter_role_arn".

{
  "operation": "create_instance",
  "name": "Production self-hosted instance",
  "region": "us-east-1",
  "instance_type": "self-hosted",
  "plan_id": "sh_production",
  "connection_details": {
    "observe_api": {
      "cross_account_role_arn": "arn:aws:iam::987654321098:role/LoxtepCrossAccountDeploymentRole"
    }
  }
}

Required fields (validated in _core/src/validation/organizations-instances-post.ts):

  • instance_type: "self-hosted"
  • plan_id — a self-hosted plan. A paid plan returns Complete Stripe Checkout to begin provisioning.
  • connection_details.observe_api.cross_account_role_arn — IAM role ARN

Self-hosted create looks up a registered account whose arn or bus_lifecycle_role_arn equals that value. A miss returns 400 Register this AWS account before creating the instance. When both meter and bus are empty on that entry, create succeeds and sets meter_role_arn, bus_lifecycle_role_arn, and workflow_deploy_role_arn on the instance to the entry's arn (workflow uses the stored workflow_deploy_role_arn when present). When both meter and bus are stored, create copies them and, when stored, workflow_deploy_role_arn. Exactly one of meter or bus stored and the other empty returns 400 missing_tier_role before an instance row or payment_pending reservation. details.missing_tiers names the missing tier (meter or bus_lifecycle), and the message names that field.

Bus install reads bus_lifecycle_role_arn on the instance and throws MissingTierRoleError when that field is empty:

Missing bus_lifecycle_role_arn for bus lifecycle. Record the deployment role ARN from the cross-account template.

It then assumes the registered role whose bus_lifecycle_role_arn equals that value. Surrounding whitespace on either ARN is ignored. A registry entry from before the tier split stores the deployment role as the account arn and has no bus_lifecycle_role_arn. That account arn matches when it equals the instance ARN. A stored bus_lifecycle_role_arn that differs from the instance ARN does not fall back to the account arn. cross_account_role_arn is not a substitute on the bus install path. A self-hosted upgrade calls requireRecordedTierRoleArn for bus_lifecycle first, so an empty instance field uses cross_account_role_arn, then uses the same lookup. A mismatch throws RegisteredBusRoleMismatchError. The message names the instance ARN, each registered bus_lifecycle_role_arn, and each account arn that has no bus role. process-instances-upgrade-requested throws that error as upgradeAttemptError and does not record the failed upgrade. process-instances-upgrade-failed records metadata.upgrade_status failed, metadata.upgrade_error as that message, and metadata.upgrade_failed_at. It emits instance.upgrade.failed. metadata.core_version stays unchanged.

Workflow deploy, bot registration, secrets replication, and code upload use workflow_deploy_role_arn when it is set, and cross_account_role_arn when it is empty. Both empty throws:

Missing workflow_deploy_role_arn for <operation>. Record the deployment role ARN from the cross-account template.

<operation> is the call, for example bot registration or instance code upload. Custom bot registration maps that throw to 500 and uses the error text as error.message. A missing external_id on that route is 400 Instance is missing dedicated BYOL prerequisites: connection_details.observe_api.external_id. Complete self-hosted/managed provisioning (cross-account role + external_id) first.

Observe signing uses meter_role_arn, then cross_account_role_arn, then observe_proxy_role_arn. A bus-only upgrade (no recorded runtimes stack, and the control plane is not attached) skips the runtimes import release and does not emit runtimes-deployment-requested. A recorded runtimes stack or control_plane_attached uses workflow_deploy_role_arn, or cross_account_role_arn when the workflow field is empty, and emits runtimes-deployment-requested when that role is present. When both are empty and control_plane_attached is true on metadata or connection_details.observe_api, with no recorded runtimes stack, process-instances-upgrade-requested resolves the role after infrastructure and before it writes success. It throws upgradeAttemptError for MissingTierRoleError (workflow_deploy, runtimes deployment) and does not record the failed upgrade. The error is routed to instances-upgrade-failed. process-instances-upgrade-failed sets metadata.upgrade_status to failed, metadata.upgrade_error to Missing workflow_deploy_role_arn for runtimes deployment. Record the deployment role ARN from the cross-account template., and metadata.upgrade_failed_at. It emits instance.upgrade.failed. metadata.core_version stays unchanged. upgrade_infra_completed_at and upgrade_infra_completed_version may already be set, and the failed record keeps them. Record workflow_deploy_role_arn with PUT /organizations/organizations/{org_id}/infrastructure and retry the upgrade. When the checkpoint is for that target, the retry skips CloudFormation and finalizes. A recorded runtimes_stack_name with both roles empty throws during the import release, before that checkpoint: Missing workflow_deploy_role_arn for runtimes import release. Record the deployment role ARN from the cross-account template. process-instances-upgrade-requested throws that as upgradeAttemptError and does not record the failed upgrade. process-instances-upgrade-failed records the same failed fields, emits instance.upgrade.failed, and leaves metadata.core_version unchanged. That path does not write the checkpoint. Record the role with the same PUT and retry. That retry runs the infrastructure step again.

rstreams_secret_arn and rstreams_auth_arn are written by provisioning from the deployed stack's outputs; callers do not send them. Sending observe_proxy_role_arn is a 400.

Do not send api_url, stack_id, observe_api.namespace, observe_api.observe_proxy_role_arn, metadata.routing, or plan metadata (metadata.subscription, tier, plan_id, limits, subscription_details). Those are platform-owned: 400, one issue per field. The create schema is .strict() (unknown key: Unrecognized key: "<key>"). connection_details is still passthrough. observe_api is .strict() (unknown keys such as api_base_url are a 400, not stripped). cross_account_role_arn must be an IAM role ARN. This create call was not run (unverified).

The bus install assumes bus_lifecycle_role_arn with the external ID from step 1, deploys the rstreams CDK stack into your account, reads the CloudFormation stack outputs, and writes them back into the instance's connection_details.observe_api. Deployment takes 20–30 minutes. Update the existing cross-account role stack before that install. See Update an existing cross-account role stack. The runtimes stack creates the workflow code bucket in this account. See Workflow code bucket.

Workflow code bucket

A managed or self-hosted runtimes deploy creates an S3 bucket for workflow code in the account that stack runs in. For self-hosted, that is the account on workflow_deploy_role_arn. For managed, that is the Loxtep account that runs the instance. The name is org-{org8}-{inst8}-{account}-code:

  • org8 is the first 8 hex characters of the organization id, with dashes removed.
  • inst8 is the first 8 hex characters of the instance id, with dashes removed.
  • account is the 12-digit AWS account id of that stack.

The bucket uses SSE-S3, blocks all public access, and requires TLS. The runtimes role can only read it (s3:GetObject on objects, s3:ListBucket and s3:GetBucketLocation on the bucket). The deployment role identity policy allows arn:aws:s3:::org-*, which covers this bucket name. Code upload assumes workflow_deploy_role_arn, or cross_account_role_arn when that field is empty. A bus-only self-hosted upgrade (no recorded runtimes stack, control plane not attached, and no workflow_deploy_role_arn) skips the runtimes import release and does not emit runtimes-deployment-requested, so it does not create this bucket.

Provisioning writes connection_details.code_bucket to that name. Do not send code_bucket. Create does not reject it (connection_details is passthrough). When provisioning records the bucket, it replaces any stored value, including one you sent, with the computed name. Update connection_details only accepts connector_vpc and connector_vpcs, so sending code_bucket on update is a 400 Unrecognized key: "code_bucket".

The name is written when the runtimes stack is submitted, not when create or upgrade is requested:

  • Create. After the core stack finishes, the runtimes deploy records the name and submits the stack that creates the bucket. A shared instance does not get this bucket or this field.
  • Upgrade. Starting an upgrade from the instance's upgrade page in the app (Upgrade available on the instance card) queues the upgrade. For a managed instance, and for a self-hosted instance that has a recorded runtimes stack or an attached control plane, that upgrade records the name during the runtimes import-release step when that step runs, and again when it submits the runtimes stack update. A recorded runtimes stack, control_plane_attached, or a recorded workflow_deploy_role_arn makes the upgrade emit runtimes-deployment-requested. The upgrade sets force_redeploy on that runtimes update, so a stack that is already deployed is updated. A runtimes request without that flag leaves an existing stack unchanged and does not write code_bucket. A bus-only self-hosted upgrade skips that import release and does not emit the runtimes event.
  • Runtimes reapply. update_instance with force_runtimes_redeploy: true (CLI loxtep instances redeploy-runtimes <instance_id>), or a connector-network change, requests the same forced runtimes update and records the name when that stack is submitted.

A workflow deploy to a managed or self-hosted instance uploads the code bundle and each code_key object into that bucket, and sets entity_config.code_bucket on the nodes it registers. An object that is already in the instance bucket stays as it is. The deploy does not replace it with the platform copy. The platform read and the instance-bucket check both treat the object as absent for NoSuchKey, NotFound, or a bare 404 ($metadata.httpStatusCode is 404 and there is no name, code, or Code). A non-object error is not absence. NoSuchBucket, AccessDenied, AllAccessDisabled, InvalidBucketName, PermanentRedirect, and SignatureDoesNotMatch on name, code, or Code are not absence. Any other read or bucket failure is not absence and fails the deploy, including when the instance bucket already has the key. When the object is in neither bucket, the deploy fails rather than pointing the runtime at the platform bucket.

Shared instances keep workflow code and the project workspace on the platform bucket.

Project workspace

For a managed or self-hosted instance, the project workspace is the objects in connection_details.code_bucket. That covers entity JSON, the project export, GitHub pull and push, workspace reindex, deployment manifests, templates, transformations, the workspace save, and the workflow graph read and save. Postgres stores a derived index of those objects. A missing object is NoSuchKey, NotFound, or a bare 404 ($metadata.httpStatusCode is 404 and there is no name, code, or Code). A non-object error is not absence. NoSuchBucket, AccessDenied, AllAccessDisabled, InvalidBucketName, PermanentRedirect, and SignatureDoesNotMatch on name, code, or Code are not absence. Any other read, parse, or bucket failure is not absence and fails the request. The index does not fill in for an object that could not be read.

Studio and deploy open that bucket with the instance's deployment role. A managed instance with no deployment role uses the platform credentials, and the bucket is still the instance code bucket. A self-hosted instance with no deployment role fails the call with HTTP 500. error.message is:

Self-hosted instance code upload requires a deployment role in connection_details. Refusing to upload workflow code with platform credentials. ObserveProxyRole is execute-api:Invoke only.

error.details includes the request id (project_id or workflow_id).

A dedicated instance reads and writes the workspace only in connection_details.code_bucket. A shared instance uses the platform bucket. Each failure below has success: false. error.message is the sentence shown. For the bucket errors, error.details includes code, name, and the request id (project_id or workflow_id). The HTTP 400 sets error.details.organization_id to the organization id.

A workflow deploy (POST /workflows/deployments, including deploy_workflow) resolves its own target, then opens the workspace with that instance id. An omitted instance_id, an empty string, or the nil UUID 00000000-0000-0000-0000-000000000000 is one dedicated instance, or one active instance when none are dedicated. Prior deployment pins and stored projects.instance_id are not used. A deploy target has deleted_at null and status active (a blank status counts). Status detached is not a deploy target. An explicit instance_id that is not an active instance returns HTTP 404 target_instance_missing before the workspace opens. error.message is Instance <id> is not an active instance for this organization. Refusing to fall back to another instance for deploy.

Several dedicated instances with no instance_id return HTTP 409 before a deployment is requested.

Organization has N dedicated instances and the deployment target is ambiguous. Pass instance_id for the instance you are deploying to. Refusing soft prefer.

N is the count of dedicated instances with deleted_at null and status active (a blank status counts). Status deleted, deleting, and detached are left out of that deploy count (isLiveActive). That differs from workspace/create_project ambiguity, where a detached instance still counts (isLive). error.details.code is ambiguous_instance. error.details.name is InstanceWorkspaceBucketError. When more than one active instance remains and none are dedicated, the message is Organization has N active instances and the deployment target is ambiguous. Pass instance_id for the instance you are deploying to. Refusing soft prefer.

When that resolver finds no dedicated instance, one instance with status active (deleted_at null) is the target and the workspace uses the platform bucket. When the organization has no such instance, the response is HTTP 400 and error.message is No active instance found for organization. When more than one active instance remains, the response is HTTP 409 ambiguous_instance. The handler does not choose the earliest created_at.

A dedicated target uses only that instance's connection_details.code_bucket. A shared target uses the platform bucket.

No code_bucket on the dedicated instance. The response is HTTP 500.

Dedicated instance <id> (<type>) has no connection_details.code_bucket. Refusing to read or write the project workspace on the platform bucket.

<id> is the instance id. <type> is the instance type stored on the record, in lower case, such as managed or self-hosted. error.details.code is dedicated_bucket_missing. error.details.name is InstanceWorkspaceBucketError.

Record the bucket, then retry the request. Upgrade the instance from its upgrade page in the app, or reapply the runtimes stack with update_instance and force_runtimes_redeploy: true. Wait until that stack update finishes and connection_details.code_bucket is set.

A workspace open names an instance that is not a live instance of this organization. A live instance has deleted_at null and a status other than deleted or deleting. The response is HTTP 404.

Instance <id> is not a live instance for this organization. Refusing to fall back to the platform bucket.

<id> is the instance id. error.details.code is target_instance_missing. error.details.name is InstanceWorkspaceBucketError.

create_project stores projects.instance_id when the call names a live instance of the organization. Omitting instance_id when the organization has two or more live dedicated instances returns HTTP 409 ambiguous_instance and does not insert the project. Omitting it when the organization has one dedicated instance, or none, stores no binding. A later project update does not change the stored id.

Studio workspace calls (entities GET/PUT, workspace PUT, workflow graph, single-entity CRUD) and reindex accept an optional instance_id query parameter (reindex also accepts it in the JSON body). Studio sends the instance selected in the deploy control. An explicit instance_id must match the project's unique deployment pin or stored projects.instance_id when either is set (HTTP 409 instance_id_mismatch on conflict). Workspace handlers do not silently open another instance bucket or the platform bucket, and they do not rewrite the stored id. Reindex POST runs the full workspace instance selection (pin or binding, then live dedicated instances) before enqueue and does not open object storage. A pin or binding conflict is HTTP 409 instance_id_mismatch and nothing is enqueued. An explicit instance_id that is not a live instance of the organization is HTTP 404 target_instance_missing and nothing is enqueued. An omitted instance_id on an unbound project with two or more live dedicated instances is HTTP 409 ambiguous_instance and nothing is enqueued. On success the event includes the resolved dedicated instance_id, including when the caller omitted it. A deployment pin still wins when instance_id is omitted on a workspace open: the workspace opens when the project's deployment rows name exactly one live dedicated instance. When they do not, the stored projects.instance_id is the choice. An explicit instance_id on a workflow deploy still selects that deploy target and does not rewrite the stored id. A stored or explicit id that is not a live instance of the organization is HTTP 404 target_instance_missing on workspace open and on reindex POST. The workspace also opens when the organization has one live dedicated instance. Several live dedicated instances, when there is no pin, no stored id, and no explicit instance_id on a workspace open:

Organization has N dedicated instances and the project workspace bucket is ambiguous. Refusing to fall back to the platform bucket.

N is the count of dedicated instances whose status is not deleted or deleting (workspace / create_project isLive). The response is HTTP 409. error.details.code is ambiguous_instance. error.details.name is InstanceWorkspaceBucketError. Instances with status deleted or deleting are left out of this workspace count. A detached instance stays in this count. Deploy ambiguity uses a stricter active-only count and leaves detached out — see the deploy N paragraph above.

Workspace storage is always this instance’s code_bucket (#5024). Open never copies from the platform bucket onto a dedicated instance. Missing .loxtep/project.json on the instance fails closed with 409 project_metadata_unavailable — materialize with pull from git / Studio on that instance. See Dedicated instance workspace (no platform copy). A workflow deploy passes the resolved target instance into that same open and reads that bucket only.

If connection_details.code_bucket is missing, the workflow deploy fails before it uploads:

Cannot deploy to <type> instance <id>: connection_details.code_bucket is not set. The instance runtimes stack creates this bucket. Refusing to upload workflow code to the platform bucket.

<type> is managed for a managed instance and customer for a self-hosted instance. <id> is the instance id.

Upgrade the instance, or reapply the runtimes stack with force_runtimes_redeploy: true, and wait until that stack update finishes and connection_details.code_bucket is set. Then deploy each workflow again. That deploy copies the current bundle and code_key objects and sets entity_config.code_bucket. force_redeploy: true on the workflow deploy only starts a deploy while another deployment of that workflow is still in progress. It does not create the bucket.

On a dedicated runtime, a custom-code or MicroVM node that runs without entity_config.code_bucket fails with:

Dedicated instance runtime requires entity_config.code_bucket. Refusing platform bucket fallback (DATA_PRODUCTS_BUCKET_NAME, LOXTEP_S3_BUCKET, loxtep-code-storage).

Shared instances do not use this check. Deploy the workflow again after connection_details.code_bucket is set so the node receives entity_config.code_bucket. An object already in the instance bucket stays there. There is no separate job that moves an existing workspace.

What about monitoring?

Monitoring for self-hosted instances is delivered through the Observe proxy. Signing uses meter_role_arn, then cross_account_role_arn, then observe_proxy_role_arn (execute-api:Invoke on botmon stats and cron). The dashboard works without CloudWatch cross-account sharing, SNS alerting, or log-group streaming.

Cost estimate

Typical monthly AWS bill for a self-hosted rstreams stack (your account):

ComponentEstimated cost
Lambda$50–200
Kinesis$100–500
DynamoDB$25–100
S3$10–50
CloudWatch$10–30
Total$195–880/month

Costs vary with usage volume and data retention. The Loxtep control-plane + management surface is billed separately via your payment_method_id (upfront charge at instance creation).


Frontend guided mode

The instance-create dialog (instance-create-dialog.tsx) renders a guided 3-step stepper when you select Self-Hosted:

  1. Deploy role — One-Click / CLI / Terraform / Manual tabs. The dialog reads deploymentOptions.oneClickUrl, cliCommand, and terraformCode. Those are the client names for data.deployment_options.one_click_url, cli_command, and terraform_code. The external ID from that response is shown read-only.
  2. Choose the AWS account for this instance — registered accounts are buttons labeled <account id> · <role name>. A badge reads 1 account or N accounts. One registered account is selected for you. Several stay unselected until you pick one. Add an AWS account (or Cross-Account Role ARN when none are registered yet) is one ARN field. The placeholder is arn:aws:iam::123456789012:role/LoxtepCrossAccountDeploymentRole. Register records the account through register_infrastructure with cross_account_role_arn and an optional region. Entering an ARN that is already registered with both meter_role_arn and bus_lifecycle_role_arn set selects that account without a PUT even when workflow_deploy_role_arn is empty (toast: This instance will use that AWS account.). Entering a registered pre-tier ARN (no meter or bus) registers it again, which fills its tier roles. Entering a registered ARN with only one of meter or bus set also registers it again (PUT). That PUT returns 409 tier_role_conflict if the stored meter or bus ARN differs from the RoleArn. That records the same ARN as meter_role_arn, bus_lifecycle_role_arn, and workflow_deploy_role_arn on the cross_account_roles entry whose arn equals that RoleArn, and sets control_plane_attached to true, when that entry's meter and bus ARNs are empty or already that RoleArn. Other entries in the same AWS account keep their tier fields. A stored meter or bus ARN on that entry that differs returns 409 tier_role_conflict and writes nothing. Send the same RoleArn as meter_role_arn and bus_lifecycle_role_arn, and send workflow_deploy_role_arn with attach_control_plane: true when workflow deploy should store that field. Send explicit tier ARNs to change a stored meter or bus ARN on that entry that differs.
  3. Click Create Instance — the create body sends observe_api.cross_account_role_arn for the account you selected. Name, region, and payment method stay on the create form. rstreams_secret_arn and rstreams_auth_arn are written by provisioning; callers do not send them. When both meter and bus are empty on the matched entry, create succeeds and uses that entry's arn for meter, bus, and workflow (stored workflow_deploy_role_arn if present). Exactly one of meter or bus stored and the other empty returns 400 missing_tier_role and does not insert the instance or reserve payment_pending.

The form checks the role ARN with roleArnRegistrationError before a self-hosted submit. An empty value shows Paste the RoleArn output from the stack Outputs tab. A value that is not an IAM role ARN shows RoleArn must be an IAM role ARN (arn:aws:iam::<12-digit account>:role/<name>).


Validation reference

Schemas live in platform-backend/_core/src/validation/organizations-instances-post.ts:

  • InstanceTypeSchema = z.enum(['shared', 'managed', 'self-hosted'])
  • Plan pairing: free/starter on shared; growth, managed_pro, scale, scale_plus, max on managed; sh_starter, sh_core, sh_production, sh_scale, sh_scale_plus on self-hosted (sh_enterprise is contact-sales). There is no plain pro plan.
  • Shared: unpaid omits plan_id or uses free. Paid starter returns Complete Stripe Checkout to begin provisioning. Role/secret coordinates on observe_api are refused.
  • Managed: requires plan_id + observe_api.cross_account_role_arn (IAM role ARN). rstreams_secret_arn and rstreams_auth_arn are written by provisioning; callers do not send them. When that ARN contains :role/ and is not ObserveProxyRole, create matches a registered account whose arn or bus_lifecycle_role_arn equals that value. When both meter and bus are empty, create uses the entry arn for meter, bus, and workflow (stored workflow_deploy_role_arn if present). When both are stored, create copies them and, when stored, workflow_deploy_role_arn. A miss returns 400 Register this AWS account before creating the instance. Exactly one of meter or bus stored and the other empty returns 400 missing_tier_role before an instance row or payment_pending reservation. The message says managed instance create. ObserveProxyRole stays on platform credentials and copies no tier ARNs. A later register_infrastructure call that includes meter and bus ARNs records those fields on the cross_account_roles entry whose arn equals the sent cross_account_role_arn, and copies them onto an instance that is not detached, whose candidate ARN is in that AWS account, and whose stored cross_account_role_arn is unset or equals the sent ARN. A detached instance stays unchanged. An instance in that account that names a different cross_account_role_arn stays unchanged. A later register_infrastructure call does not restore bus or workflow ARNs that detach cleared on a detached instance. Other entries in the same AWS account keep their tier fields.
  • Self-hosted: requires plan_id + observe_api.cross_account_role_arn. Create matches a registered account whose arn or bus_lifecycle_role_arn equals that value. Empty meter and bus fall back to the entry arn; both stored copies them; a one-sided gap is 400 missing_tier_role. An unregistered ARN returns 400 Register this AWS account before creating the instance. rstreams_secret_arn and rstreams_auth_arn are written by provisioning; callers do not send them.
  • Platform-owned (400, one issue per field): api_url, stack_id, metadata.routing, observe_api.namespace, observe_api.observe_proxy_role_arn, and plan metadata (metadata.subscription|tier|plan_id|limits|subscription_details — metadata.<key> is set by the platform from plan_id; send plan_id instead.).
  • CreateInstanceMcpFlatInputSchema, PostInputSchema, and InstanceConfigSchema are .strict(): an unknown key is a 400 Unrecognized key: "<key>" (unrecognized_keys), not stripped. A top-level MCP api_url fails that way instead of being dropped (Validation failed: : Unrecognized key: "api_url"; HTTP details.field "root"). connection_details is still .passthrough(). ObserveApiDetailsSchema is .strict() (api_base_url / nested api_url are a 400).
  • A strict failure reports only the unknown key. Platform-owned field refusals on the same request are not listed until the unknown keys are removed (MCP instance_typo plus observe_api.namespace returns only Unrecognized key: "instance_typo").

The same schema validates every create, including create_instance. The schema lists namespace and observe_proxy_role_arn only so it can refuse them; sending either is a 400. The loxtep-sdk CLI (parseCreateInstanceArgs on main de6bc7c0e7380f3d1afee9556d5a5b6bd2b0dd4b) still requires all three ARNs on the client for self-hosted (--cross-account-role-arn, --rstreams-secret-arn, --rstreams-auth-arn) even though create_instance does not. Use create_instance for managed and self-hosted instances. The MCP JSON bodies and CLI lines in this guide are examples. They were not run or checked against PostInputSchema for this update (unverified). CLI flag lines with placeholders are unverified.


Troubleshooting

Missing bus or workflow role

Bus install with an empty bus_lifecycle_role_arn fails with MissingTierRoleError:

Missing bus_lifecycle_role_arn for bus lifecycle. Record the deployment role ARN from the cross-account template.

Workflow deploy, bot registration, secrets replication, code upload, and a runtimes deploy that has a recorded runtimes stack or an attached control plane use workflow_deploy_role_arn, then cross_account_role_arn. Both empty:

Missing workflow_deploy_role_arn for <operation>. Record the deployment role ARN from the cross-account template.

Record the same RoleArn as cross_account_role_arn, meter_role_arn, and bus_lifecycle_role_arn with the step 3 register_infrastructure call. A call that sends only cross_account_role_arn records meter, bus, and workflow on the cross_account_roles entry whose arn equals that RoleArn, when that entry's meter and bus ARNs are empty or already that RoleArn. Other entries in the same AWS account keep their tier fields. A differing meter or bus ARN on that entry returns 409 tier_role_conflict and writes nothing. The copy reaches an instance that is not detached and whose stored cross_account_role_arn is unset or equals that RoleArn. A detached instance stays unchanged, and a later register_infrastructure call does not restore bus or workflow ARNs that detach cleared. An instance that names a different cross_account_role_arn stays unchanged. A self-hosted upgrade whose recorded bus ARN equals a legacy account arn with no bus_lifecycle_role_arn uses that account role. When the recorded ARN matches neither a stored bus role nor a legacy account role, process-instances-upgrade-requested throws RegisteredBusRoleMismatchError as upgradeAttemptError and does not record the failed upgrade. The message names the instance ARN and the registered ARNs. process-instances-upgrade-failed records metadata.upgrade_status failed, metadata.upgrade_error as that message, and metadata.upgrade_failed_at. It emits instance.upgrade.failed. metadata.core_version stays unchanged. A self-hosted upgrade that needs a workflow role and has neither workflow_deploy_role_arn nor cross_account_role_arn fails the same way, and metadata.core_version stays unchanged. It needs that role when metadata.runtimes_stack_name is set, or when control_plane_attached is true on metadata or connection_details.observe_api. With no recorded runtimes stack, process-instances-upgrade-requested resolves the role after infrastructure and throws upgradeAttemptError before it writes success. process-instances-upgrade-failed sets metadata.upgrade_status to failed, metadata.upgrade_error to Missing workflow_deploy_role_arn for runtimes deployment. Record the deployment role ARN from the cross-account template., and metadata.upgrade_failed_at. It emits instance.upgrade.failed. upgrade_infra_completed_at and upgrade_infra_completed_version may already be set, and the failed record keeps them. Record workflow_deploy_role_arn with register_infrastructure and retry the upgrade. When the checkpoint is for that target, the retry skips CloudFormation and finalizes. A recorded runtimes stack with both roles empty fails earlier, during the import release, with Missing workflow_deploy_role_arn for runtimes import release. Record the deployment role ARN from the cross-account template. process-instances-upgrade-requested throws that as upgradeAttemptError and does not record the failed upgrade. process-instances-upgrade-failed records the same failed fields, emits instance.upgrade.failed, and leaves metadata.core_version unchanged. That path does not write the checkpoint. Record the role with the same register_infrastructure call and retry. That retry runs the infrastructure step again.

"Register this AWS account before creating the instance."

Self-hosted create did not find a registered account whose arn or bus_lifecycle_role_arn equals observe_api.cross_account_role_arn. Record that account with the step 3 register_infrastructure call, then create the instance with that RoleArn.

"Cannot copy tier roles onto instance …"

register_infrastructure failed while copying tier ARNs onto an instance. The organization write and the instance copies are one transaction, so nothing from the call is saved. The body is 500 Cannot copy tier roles onto instance ${instance_id}: ${detail}. error.details.code is instance_tier_copy_failed and error.details.instance_id is that instance id. detail is the JSON parse error, or the message from an observe_api candidate ARN that is not an IAM role ARN. Fix that instance's connection_details and repeat the call.

"An organization can register at most 32 AWS accounts."

register_infrastructure refused another role. The list already has 32 entries.

"External ID not found for organization …"

loxtep/org/{org_id}/external-id is missing in Secrets Manager. Re-run get_deployment_urls (CLI loxtep instances deployment-urls) — it will create the secret. (Pre-fix deployments wrote the external_id only to DB attributes; the new path mirrors it into Secrets Manager.)

CloudFormation stack fails to deploy (AccessDenied)

The scoped IAM policy was iterated against a scratch AWS account. If you hit an AccessDenied on a Loxtep-prefixed resource, the policy may need one more scoped action — contact support@loxtep.io with the error message so we can add it without falling back to AdministratorAccess.

"Cannot deploy to … connection_details.code_bucket is not set"

The instance is managed or self-hosted and provisioning has not recorded connection_details.code_bucket. Upgrade the instance from its upgrade page in the app, or reapply the runtimes stack (update_instance with force_runtimes_redeploy: true). Wait until the runtimes stack update finishes and the field is set, then deploy the workflow again. A self-hosted deploy prints the instance type as customer in this message. See Workflow code bucket.

"Dedicated instance runtime requires entity_config.code_bucket"

A custom-code or MicroVM node on a managed or self-hosted runtime has no entity_config.code_bucket. Confirm connection_details.code_bucket is set, then deploy that workflow again so the deploy copies the code into the instance bucket and sets the field on the node. An object already in the instance bucket stays there. Shared instances do not raise this error.

"Dedicated instance … has no connection_details.code_bucket"

A workspace read or write on a managed or self-hosted instance found no connection_details.code_bucket. The response is HTTP 500. error.details.code is dedicated_bucket_missing and error.details.name is InstanceWorkspaceBucketError. Upgrade the instance or reapply the runtimes stack (force_runtimes_redeploy: true), wait until the field is set, then retry. See Project workspace.

"Instance … is not a live instance for this organization"

A workspace call named an instance_id that is not a live instance of this organization. A live instance has deleted_at null and a status other than deleted or deleting. The response is HTTP 404. error.message is Instance <instance_id> is not a live instance for this organization. Refusing to fall back to the platform bucket. error.details.code is target_instance_missing and error.details.name is InstanceWorkspaceBucketError. Send a live instance id for this organization. On a workspace call, omitting instance_id uses the project's single dedicated instance or the one dedicated instance named by its deployment rows, then the stored projects.instance_id. Studio sends the selected instance as instance_id.

A workflow deploy that names an instance_id that is not an active instance returns HTTP 404 before the workspace opens. An active instance has deleted_at null and status active (a blank status counts). error.message is Instance <id> is not an active instance for this organization. Refusing to fall back to another instance for deploy. error.details.code is target_instance_missing. See Project workspace.

Dedicated instance workspace (no platform copy)

Open the project in Studio on the managed or self-hosted instance (the app sends that instance_id). Workspace is always that instance’s bucket (#5024). Shared may share the same physical store as the historical “platform” bucket — that is the shared instance’s bucket, not a source to copy from. Platform→dedicated migrate-on-open is removed.

When .loxtep/project.json is missing on the instance code_bucket, readers return 409 project_metadata_unavailable (even if another bucket still has a copy). Materialize with pull from git / Studio create on that instance — do not S3-seed from the platform bucket. Pull requires that instance's instance_id. A missing, blank, or non-UUID value returns HTTP 400 from validation. Studio restore still sends instance_id via Pull. Omitting instance_id on Pull is not a supported user path.

Export and an unbound loxtep projects clone omit instance_id. They return 409 project_metadata_unavailable when the opened dedicated bucket lacks .loxtep/project.json. Hosted MCP reindex_workspace accepts optional instance_id and passes it to the same resolve (omit only when unambiguous — fail-closed ambiguous_instance). CLI loxtep push reindex and SDK projects.reindex still POST without instance_id and also do not copy from platform.

"Organization has N dedicated instances and the project workspace bucket is ambiguous"

Creating a project (create_project) with no instance_id, or a Studio workspace open with no instance_id, found more than one dedicated instance, and the project has neither a deployment pin nor a stored projects.instance_id. Create does not insert the project. The response is HTTP 409. error.details.code is ambiguous_instance and error.details.name is InstanceWorkspaceBucketError. The workspace opens when one dedicated instance remains in the count, when those deployment rows already name exactly one, or when the call names a live instance_id. For this workspace / create_project count, deleted and deleting are left out; a detached instance stays (isLive). Pass the selected live instance as instance_id on the workspace call (Studio does this). Reindex POST with no instance_id on an unbound project in that org is HTTP 409 ambiguous_instance and nothing is enqueued. Hosted MCP reindex_workspace accepts optional instance_id and passes it to requestWorkspaceReindex (same resolve; fail-closed ambiguous_instance when omitted on that unbound project). The tool call fails before enqueue. The tool error text is that ambiguous message. The tools/call response is HTTP 400 tool_failed with error.details.error_class validation. error.details.code stays tool_failed; the domain code is not copied. When that omitted call selects a stored binding that is no longer live, the tools/call response is HTTP 404 tool_failed with error.details.error_class not_found. CLI loxtep push reindex and SDK projects.reindex still POST with no instance_id and receive HTTP 409 ambiguous_instance from the POST. See Project workspace.

A workflow deploy with no instance_id is a different 409 when more than one active dedicated instance remains (whether or not a deployment pin exists). Deploy is not requested. The deploy message is Organization has N dedicated instances and the deployment target is ambiguous. Pass instance_id for the instance you are deploying to. Refusing soft prefer. For that deploy count, deleted, deleting, and detached are all left out (isLiveActive). Do not treat the workspace FAQ line “detached stays” as the deploy rule.

"Payment method is required for managed and self-hosted instances"

Add a payment method in the Loxtep dashboard → Billing, then pass its UUID as payment_method_id. Shared instances don't require one.


After provisioning: connect data and build workflows


Bring your own Lambda (BYOL)

Already deploying Lambdas on a self-hosted or managed instance and want LeoCron triggers without Studio workflow deploy? See the full customer guide: Bring your own Lambda (including when to use BYOL vs connector ingest/delivery vs Studio custom code).

You do not need a Studio project deploy for the function. Quick path: deploy the function in the instance AWS account → loxtep_workspace → register_custom_bot (or loxtep bots register) → attach returned iam_policy + bus secrets → bind a data product to {bot_id}-out (runtime queue reconciliation or workflow deploy so deployment_bindings.queue_name is set) → unpause in Observe. Hybrid with connector Triggers/Targets or Studio custom-code hops is fine — join via queue + catalog bind.


Stop managing or delete an instance

Stop managing an instance when it should keep running without Loxtep deploys or upgrades. Bots keep running unless you choose to pause them. Deploy a project to that instance when you want Loxtep to manage it again.

Delete an instance when you want it and its stack removed. That cannot be undone. A self-hosted instance that has a stack asks you to confirm before the stack is removed.

From the organization instances page, choose Stop managing or Delete.

Stop managing asks whether bots keep running (leave, the default) or pause (pause). When the instance is self-hosted, or its observe_api holds a customer role ARN (a value that is not ObserveProxyRole), stop managing also needs cross_account_access: meter or none. Omitting it returns 400 Choose cross_account_access meter or none before detaching this instance.

meter keeps meter_role_arn and cross_account_role_arn on the instance and removes bus_lifecycle_role_arn and workflow_deploy_role_arn. none removes all four. Detach does not delete the IAM roles in AWS and does not change the organization registration. It sets status to detached, metadata.cross_account_access to the choice, metadata.control_plane to detached, and metadata.deploy_role_use to stopped. An instance that is already detached returns 200 with data.idempotent true and does not apply the choice again. A later PUT /organizations/organizations/{org_id}/infrastructure does not restore the cleared bus_lifecycle_role_arn or workflow_deploy_role_arn on a detached instance. Registration leaves that instance unchanged.

Delete asks you to confirm stack teardown when the instance is self-hosted and has a stack.