Connect an AWS Organization

In this guide, you will connect your AWS Organization to Turbot Guardrails using the Create Connection wizard. The wizard handles everything in a single flow: creating an IAM role, discovering your org structure, and connecting your accounts.

Connecting via an organization is the recommended way to bring AWS accounts into Guardrails. It discovers your entire org hierarchy automatically and gives you granular control over which accounts to govern and at what level, from lightweight account-level visibility (Account Only mode) through to full resource discovery and remediation (Resources mode).

Prerequisites

[!NOTE] Guardrails uses read-only access to discover your organization hierarchy. You will deploy a CloudFormation template that creates a single IAM role with AWSOrganizationsReadOnlyAccess permissions. Nothing is modified in your AWS accounts.

Step 1: Open the Create Connection Wizard

From the Dashboard (the Guardrails home page), select the CONNECT button in the top right. You can also start from the Accounts page (Workspace > Accounts) by selecting Import. Both open the same Create Connection wizard.

Guardrails Dashboard with the CONNECT button in the top right

Step 2: Select a Provider

The wizard displays a grid of available cloud providers. Each provider shows an Installed or Not Installed badge indicating whether the corresponding mod is available in your workspace.

Select AWS from the provider grid.

Provider selection grid showing AWS, Azure, GCP, GitHub, and other providers with Installed/Not Installed badges

Step 3: Choose Connection Type

Choose AWS Organization (recommended). This connects your entire organization with automatic account discovery and granular exclusion controls.

AWS Connection Type selection showing AWS Organization (recommended) and AWS Account options

The alternative AWS Account option connects a single standalone account. For the Getting Started flow, we recommend connecting your organization.

Step 4: Deploy the IAM Role

The wizard presents a 5-step process. Step 1 configures and deploys the IAM role that grants Guardrails read-only access to your organization hierarchy.

Wizard step 1 showing Deploy AWS IAM Role with partition, role name, external ID, and CloudFormation template download

Configure Role Settings

FieldDefault ValueDescription
AWS PartitionCommercial (aws)Select your AWS partition. Options include US Gov Cloud and China Cloud.
Organization Connection Role Nameturbot_guardrails_org_connectionName of the IAM role to create in your management account.
Organization Connection Role External IDAuto-generatedUsed in the role's trust policy. Copy, lock/unlock, or regenerate as needed.

About the External ID

Guardrails auto-generates a unique External ID for your workspace (e.g., turbot-123456789012345-a1b2c3d4). We recommend using this value. It prevents the confused deputy problem. You can also set a custom External ID by clicking the lock icon to unlock the field.

For more information, see What is Guardrails AWS IAM Role External ID Protection?

Review the Template (Optional)

Click the eye (View & explain template) icon next to the download button to preview the CloudFormation template directly in the wizard. The viewer displays the template with color-coded sections and plain-language explanations of each resource.

Template viewer showing the CloudFormation template with color-coded sections and explanations

The template creates a single IAM role with:

Deploy the CloudFormation Template

Click Download Organization Connection Role Template to download the CloudFormation JSON file.

Bottom of wizard step 1 showing Download template button, View & explain template button, and Continue button

[!IMPORTANT] Keep the Guardrails wizard tab open while deploying in AWS. The External ID is generated for this session.

You have two options for deploying the template: the AWS Console (UI) or the AWS CLI. Both achieve the same result.

Option A: Deploy via the AWS Console
  1. Open your AWS Management Console in a new tab and navigate to CloudFormation > Stacks.

    CloudFormation Stacks page in the AWS Console

  2. Click Create stack and select With new resources (standard).

    Create stack dropdown menu

  3. Under Specify template, select Upload a template file and upload the downloaded JSON file.

    Upload template file option selected

    After uploading, the filename appears in the upload area.

    Template filename shown after upload

    Click Next.

  4. On the Specify stack details page, enter a stack name (e.g., turbot-guardrails-org-connection). The parameters are pre-filled from the template. Verify they match the values shown in the Guardrails wizard.

    Stack details page showing stack name and pre-filled parameters

    Click Next, then Next again on the Configure stack options page.

  5. On the Review page, scroll to the bottom. You must acknowledge that CloudFormation will create IAM resources by checking the I acknowledge checkbox.

    IAM capabilities acknowledgment checkbox

    Click Submit to create the stack.

    Review and create page summary

  6. Wait for the stack status to show CREATE_COMPLETE (usually under 30 seconds).

    Stack showing CREATE_COMPLETE status

  7. Go to the Outputs tab and copy the RoleArn value. You'll paste this into the Guardrails wizard next.

    Outputs tab showing RoleArn, ExternalId, and RoleName

Option B: Deploy via the AWS CLI

If you prefer the command line, deploy the downloaded template using the AWS CLI:

aws cloudformation create-stack \
  --stack-name turbot-guardrails-org-connection \
  --template-body file://turbot-guardrails-org-connection.json \
  --capabilities CAPABILITY_NAMED_IAM

Wait for the stack to complete:

aws cloudformation wait stack-create-complete \
  --stack-name turbot-guardrails-org-connection

Retrieve the Role ARN from the stack outputs:

aws cloudformation describe-stacks \
  --stack-name turbot-guardrails-org-connection \
  --query "Stacks[0].Outputs[?OutputKey=='RoleArn'].OutputValue" \
  --output text

Copy the ARN value (e.g., arn:aws:iam::157183164346:role/turbot_guardrails_org_connection).

Return to the Guardrails wizard and click Continue to proceed to verification.

[!TIP] Already deployed a role? You can skip the download and go straight to verification. The wizard includes a note: "Already deployed a role? You can skip downloading and proceed to verification."

Step 5: Verify the Connection

Enter the role details from the CloudFormation stack you just deployed.

Wizard step 2 showing Verify AWS IAM Role with External ID and Role ARN fields

  1. In the Organization Connection Role External ID field, enter the External ID you configured in step 1 (it must match the ExternalId condition in your role's trust policy).
  2. Paste the Organization Connection Role ARN from the CloudFormation stack outputs.
  3. Click Verify AWS IAM Organization Connection Role.

Guardrails will assume the role and discover your organization structure. On success, you'll see Discovery Complete with your organization details: the number of accounts, OUs, organization ID, and management account.

Wizard step 2 after successful verification showing Discovery Complete with 20 accounts, 11 OUs, organization ID, and management account

[!TIP] If verification fails with an "Access Denied" error, check that:

Click Continue to proceed.

Step 6: Configure Discovery Settings

After successful verification, the wizard shows your discovered organization tree. The Organization Summary at the top displays the organization ID, management account, root name, account count, OU count, and how many accounts are already imported.

Below the summary, the Discovered Accounts and OUs section shows a tree view of your org hierarchy. Each node has a Connection Level dropdown.

Wizard step 3 showing Organization Summary with 20 accounts, 11 OUs, and the discovered org tree with Connection Level dropdowns

Connection Levels

Configure the Connection Level for each OU and account:

Connection LevelWhat Guardrails DiscoversWhat You GetIAM Role Required in Member Account?
NoneNothing, the account is excluded from GuardrailsThe account is not imported. If it was previously imported, the account and all its discovered resources are permanently removed from Guardrails (see details below)No
Account OnlyAccount metadata and organization-level policies (SCPs, RCPs, tag policies)Visibility into your org's policies (SCPs, RCPs, tag policies) and how they flow through your hierarchyNo
All ResourcesEverything in Account Only, plus individual resources within each account (S3 buckets, EC2 instances, IAM roles, etc.)Full Guardrails visibility: runtime controls, resource-level policy evaluation, and auto-remediationYes, an IAM role must be deployed in each member account

You can also uncheck items to exclude them entirely from this connection. Excluding an OU excludes all its children.

None Connection Level

The None option is available on individual OUs and accounts (but not on the organization root). It behaves differently depending on whether the account already exists in Guardrails:

[!CAUTION] Setting an existing account to None is a destructive action. The account and all its Guardrails data will be permanently removed. To re-govern the account later, change the connection level back to Account Only or All Resources and wait for Guardrails to re-discover it.

Connection levels set on an OU cascade to all its children. However, if an existing account inherits None from a parent OU (rather than being set directly), Guardrails ignores the inherited None and keeps the account at its current level. This prevents accidental deletion of accounts when reorganizing your OU hierarchy. Only a direct None setting on an existing account triggers removal.

Connection levels set on an OU cascade to all its children (shown as "Inherited"). Individual accounts can override the inherited value.

Choosing Your Approach

You have two options:

Option A: Start with Account Only mode. Set the root to Account Only. This requires no additional IAM permissions in member accounts, just the organization-level read-only role you already deployed. You get immediate visibility into your organization-level policies (SCPs, RCPs, tag policies) across the entire org. You can then upgrade individual accounts to All Resources mode later when you're ready for deeper governance.

Option B: Import in All Resources mode now. Set some or all accounts to All Resources during this initial connection. This gives you full governance immediately, but you must first deploy an IAM role to those member accounts via a CloudFormation StackSet. If you choose this option, you'll need to:

  1. Complete this wizard with the accounts set to All Resources.
  2. Before Guardrails can discover resources, deploy the member account IAM role to each of those accounts (typically via a CloudFormation StackSet). See Connect a Member Account for the complete walkthrough.

[!TIP] Most organizations start with Account Only mode to get immediate value from your organization-level policies, then upgrade specific accounts to All Resources mode as they're ready. This lets you evaluate Guardrails incrementally without deploying IAM roles to every account upfront.

Click Connect All & Continue to proceed.

Step 7: Choose Destination Folder

Choose where to place this connection in your Guardrails resource hierarchy.

Wizard step 4 showing Destination Folder selection with Goliath folder selected and Create Folder button

Select an existing folder from the Destination Folder dropdown, or click Create Folder to create a new one. Consider naming the folder after your organization (e.g., "Goliath Federal Bank").

The imported organization and all its accounts will be placed in this folder within the Guardrails resource hierarchy.

Click Continue to proceed to the final step.

Step 8: Review and Connect

The final step shows a summary of your configuration, grouped into sections:

A "What happens next" section explains the incremental adoption path. You can expand your governance over time by configuring member account connections and enabling runtime monitoring.

Wizard step 5 showing review summary with IAM role details, 20 accounts, 11 OUs, destination folder, and Create Connection button

Review the details and click Create Connection to start the import.

Step 9: Monitor Discovery Progress

After connecting, Guardrails takes you to your new AWS Organization's resource page. The Explore tab lists the resources Guardrails discovers under the organization (its service control policies, organizational units, and accounts) as they appear.

AWS Organization resource page on the Explore tab showing discovered organization service control policies

Guardrails processes the organization tree from the root down, so the resource count climbs over the next few minutes as it discovers each OU and account. Refresh the page to update the counts, or switch to the Detail tab to see the organization's raw data.

[!NOTE] Discovery typically takes a few minutes depending on the size of your organization. You don't need to wait. You can navigate away and come back later.

Step 10: Review Your Member Accounts

You're still on your organization's resource page from the previous step. The Explore tab lists everything Guardrails discovers under the organization, so your member accounts are mixed in with service control policies and OUs. To narrow the list to just the accounts, open the Type filter and select AWS > Account.

The organization's Explore tab with the Type filter set to AWS > Account, listing the discovered member accounts with their OU paths

The list now shows each member account labeled with its full path through your OU hierarchy, for example Root > Workloads > Retail Banking > 108703420065. Each row's Resources, Policies, Alerts, and Controls counts stay low because you connected in Account Only mode. Guardrails is tracking each account's metadata and organization-level policies. Use the search box to filter further, or click an account to open its resource page.

Next Steps

Troubleshooting

IssueSolution
CONNECT / Import button not visibleEnsure you have admin privileges in your Guardrails workspace. The CONNECT button is in the top right of the Dashboard, and Import is on the Accounts page (Workspace > Accounts).
AWS provider shows "Not Installed"The AWS mod needs to be installed in your workspace. Contact your Guardrails administrator.
CloudFormation stack failsCheck the Events tab for error details. Common causes: insufficient IAM permissions, or a role with the same name already exists.
IAM capabilities checkbox missedCloudFormation requires you to acknowledge that the template creates IAM resources. Scroll to the bottom of the Review page and check the acknowledgment box.
Verification fails with "Access Denied"Ensure the CloudFormation stack completed, the External ID matches, and the role has AWSOrganizationsReadOnlyAccess. Verify you deployed in the management account.
Organization not discoveredCheck that the Role ARN points to your management account (or a delegated admin account) and that the role has Organizations read permissions.
Discovery shows errors on some accountsThis is expected in Accounts mode. Errors typically indicate accounts where Guardrails attempted deeper discovery but lacks member-account IAM roles. These errors resolve when you configure member account access later.

If you run into issues, jump in the #guardrails channel in the Turbot Community Slack, or open a support ticket.