Skip to content

Deploy domain-account trust

The trust stack grants Konductor for Amazon EventBridge cross-account access to create and manage domain resources: each environment's app-side event bus and dead-letter queue (DLQ), including their tags and the bus's delivery policy. See cross-account trust for the role's permissions and the platform roles that assume it.

Deploy one trust role in each domain account. The same role serves every environment of every domain owned by that account.

A registration can also pin individual environments to accounts other than its owner account (environmentAccounts). Deploy the trust stack once in every distinct account any approved domain resolves into — the owner account plus every account named in an override. An environment mapped to an account without the trust role fails provisioning with an assume-role denial, exactly as an owner account without the role does today.

Prerequisites

Before deployment, confirm the following prerequisites:

  1. The Konductor core stack is deployed in the platform account.
  2. You know the Organization value matching the Konductor configuration (default: acme).
  3. You have an AWS Command Line Interface (AWS CLI) profile with permission to deploy AWS CloudFormation stacks in the target domain account.

Deploy

Use the Makefile target for the standard deployment, or supply parameters directly with the AWS CLI.

The deploy-trust Makefile target resolves KonductorFunctionRoleArn, ProvisioningWorkflowRoleArn, and RetagWorkflowRoleArn from the deployed konductor-core stack outputs. You do not need to copy these Amazon Resource Names (ARNs) manually. The target reads the outputs with your current credentials, or with PLATFORM_PROFILE when you set it, and deploys the trust stack with APP_PROFILE:

make deploy-trust AWS_REGION=<region> APP_PROFILE=<aws-cli-profile>

Override the organization if needed:

make deploy-trust APP_PROFILE=demo ORGANIZATION=myorg

Manual (alternative)

If you need full control over the deployment parameters, use aws cloudformation deploy directly:

aws cloudformation deploy \
  --template-file trust-stack.yaml \
  --stack-name konductor-trust \
  --parameter-overrides \
    KonductorRoleArn=arn:aws:iam::<platform-account-id>:role/konductor-function-role \
    ProvisioningWorkflowRoleArn=arn:aws:iam::<platform-account-id>:role/konductor-provisioning-workflow-role \
    RetagWorkflowRoleArn=arn:aws:iam::<platform-account-id>:role/konductor-retag-workflow-role \
    Organization=<org> \
  --tags Application=konductor Component=trust \
  --capabilities CAPABILITY_NAMED_IAM \
  --region <region>

Replace <platform-account-id>, <org>, and <region> with your platform account ID, organization identifier, and AWS Region. All three role ARNs are required; they match the konductor-core stack outputs of the same names (KonductorFunctionRoleArn supplies KonductorRoleArn). The following example uses organization acme and the fictitious platform account 111111111111:

aws cloudformation deploy \
  --template-file trust-stack.yaml \
  --stack-name konductor-trust \
  --parameter-overrides \
    KonductorRoleArn=arn:aws:iam::111111111111:role/konductor-function-role \
    ProvisioningWorkflowRoleArn=arn:aws:iam::111111111111:role/konductor-provisioning-workflow-role \
    RetagWorkflowRoleArn=arn:aws:iam::111111111111:role/konductor-retag-workflow-role \
    Organization=acme \
  --tags Application=konductor Component=trust \
  --capabilities CAPABILITY_NAMED_IAM \
  --region us-east-1

Verify

After deployment, confirm the trust role exists and has the correct trust policy:

aws iam get-role --role-name <org>-konductor-trust-role

The trust policy names the platform account root as principal, constrained by an ArnEquals condition on aws:PrincipalArn to exactly the Konductor function role, the provisioning workflow role, and the retag workflow role. Only those three roles can assume the trust role; the account-root principal alone grants nothing.

IAM resolves role-ARN principals to internal unique IDs when it saves a trust policy. If the core stack recreates a named role, that role receives a new ID. A policy that names the role directly then loses its trust relationship.

The aws:PrincipalArn condition instead compares the ARN string on each request. All three platform role names are fixed, so the trust relationship survives core-stack redeployments.

What the trust stack creates

Resource Purpose
<org>-konductor-trust-role IAM role the Konductor assumes to manage resources in this account, across all environments of all domains

The role grants scoped permissions for:

  • EventBridge: create, delete, describe, and tag event buses, and manage bus permissions (scoped to <org>-* buses, covering all envs)
  • SQS: create, delete, and tag DLQ queues, and read or set their attributes (scoped to <org>-* queues, covering all envs)
  • IAM: create and delete bus-to-bus roles (scoped to <org>-*-b2b-* roles). Unused: no workflow creates these roles, and subscription delivery relies on the bus delivery policy set at provisioning. The template retains the permission for compatibility.

Updating the trust stack

Redeploying the Konductor core stack does not require any trust stack update: the platform role names are fixed, their ARN strings do not change, and the trust policy's aws:PrincipalArn condition keeps matching. Rerun the Makefile target only if the role ARNs themselves change (different platform account, renamed roles) or an upgrade adds a platform role, as the installation handoff describes for the retag role. The target fetches the latest ARNs:

make deploy-trust AWS_REGION=<region> APP_PROFILE=<aws-cli-profile>

Or update manually:

aws cloudformation deploy \
  --template-file trust-stack.yaml \
  --stack-name konductor-trust \
  --parameter-overrides \
    KonductorRoleArn=<new-role-arn> \
    ProvisioningWorkflowRoleArn=<new-workflow-role-arn> \
    RetagWorkflowRoleArn=<new-retag-role-arn> \
    Organization=<org> \
  --tags Application=konductor Component=trust \
  --capabilities CAPABILITY_NAMED_IAM \
  --region <region>

Removing the trust stack

Deleting the stack revokes cross-account access. Existing domain resources remain in the account, but Konductor can no longer manage them.

make teardown-trust AWS_REGION=<region> APP_PROFILE=<aws-cli-profile>

Or delete manually:

aws cloudformation delete-stack --stack-name konductor-trust --region <region> --profile <aws-cli-profile>

Troubleshooting

Issue Resolution
AccessDenied during domain provisioning Verify the trust role exists in the target account and its trust policy's aws:PrincipalArn condition lists the correct platform role ARNs
Stack fails with CAPABILITY_NAMED_IAM error Add --capabilities CAPABILITY_NAMED_IAM to the deploy command
Role name conflict The role name follows <org>-konductor-trust-role. Ensure no pre-existing role with that name exists

Installation handoff (three-role recipe)

Deploy the trust stack in each domain account that will own domains. This grants Konductor cross-account access to provision domain resources, including tagging them with the domain's tag set. Existing installations: redeploy the trust stack after upgrading past the resource-tagging change—without the added tag permissions, app-side provisioning fails at the tagging step. Likewise, after upgrading past the editable cost-center change, redeploy the trust stack with the new RetagWorkflowRoleArn parameter—without it, cost-center retagging of app-side resources fails with an assume-role denial and the platform emits RetagDomainFailed.

Switch your AWS CLI credentials to the domain account, then:

aws cloudformation deploy \
  --template-file trust-stack.yaml \
  --stack-name konductor-trust \
  --parameter-overrides \
    KonductorRoleArn=<KonductorFunctionRoleArn from Phase 2> \
    ProvisioningWorkflowRoleArn=<ProvisioningWorkflowRoleArn from Phase 2> \
    RetagWorkflowRoleArn=<RetagWorkflowRoleArn from Phase 2> \
    Organization=<org> \
  --tags Application=konductor Component=trust \
  --capabilities CAPABILITY_NAMED_IAM \
  --region <region>

Example:

aws cloudformation deploy \
  --template-file trust-stack.yaml \
  --stack-name konductor-trust \
  --parameter-overrides \
    KonductorRoleArn=arn:aws:iam::111111111111:role/konductor-function-role \
    ProvisioningWorkflowRoleArn=arn:aws:iam::111111111111:role/konductor-provisioning-workflow-role \
    RetagWorkflowRoleArn=arn:aws:iam::111111111111:role/konductor-retag-workflow-role \
    Organization=acme \
  --tags Application=konductor Component=trust \
  --capabilities CAPABILITY_NAMED_IAM \
  --region us-east-1

A single trust role (<org>-konductor-trust-role) serves all environments of all domains in the account.

For verification and troubleshooting, see Verify and Troubleshooting.