Connect an Individual Account
In this guide, you will import a single AWS account into Guardrails using the Create Connection wizard.
[!TIP] For multi-account environments, connecting your AWS Organization is the recommended approach. It discovers all member accounts automatically, lets you set discovery levels per-account, and supports deploying IAM roles via StackSet. Individual account import is best for standalone accounts not part of an organization.
Prerequisites
Turbot/AdminorTurbot/Ownerpermissions.- The
awsmod installed in your workspace. - A cross-account IAM role in the target AWS account (you can create it during the wizard using the provided CloudFormation template).
[!IMPORTANT] Free Tier AWS accounts cannot be used with Guardrails. They lack the API limits needed for resource discovery.
Supported Partitions
| Partition | Name | Authentication |
|---|---|---|
aws | Commercial | Cross-account IAM role (default) |
aws-us-gov | GovCloud | IAM access key pair, see GovCloud guide |
aws-cn | China | IAM access key pair, see GovCloud guide |
Step 1: Open the Create Connection Wizard
From the Dashboard, select the CONNECT button in the top right (or from Workspace > Accounts, select Import). Select AWS from the provider grid, then choose AWS Account.
The wizard walks you through connectivity settings, a connection test, choosing a destination folder, and a final review.
Step 2: Configure Connectivity Settings

AWS Partition
Select your AWS partition. The default is Commercial (aws).
Access Type
| Type | Description |
|---|---|
| IAM Role (recommended) | Cross-account role assumption. Guardrails assumes a role in your account using the Guardrails host account as the trusted principal. |
| Access Key | IAM access key pair. Required for cross-partition imports (GovCloud, China). |
Permission Features
Toggle the capabilities you need:
| Feature | Description |
|---|---|
| Enable Realtime Events (recommended) | Includes CloudWatch Events and SNS permissions in the IAM role so Guardrails can receive real-time change notifications. |
| Enable Runtime Remediation | Grants AdministratorAccess so Guardrails can automatically fix policy violations. |
The Required Permissions summary updates based on your selections:
- ReadOnly Access, always included.
- CloudWatch Events & SNS, when Realtime Events is enabled.
- Write Access, when Runtime Remediation is enabled.
Step 3: Configure the IAM Role

| Field | Description |
|---|---|
| Role Name | The IAM role name (default: turbot_guardrails). Must match the role you create in your AWS account. |
| External ID | Auto-generated unique ID for the trust policy. Copy this value. You'll need it when creating the role. Click the lock icon to use a custom value. |
| Role ARN | The full ARN of the IAM role (e.g., arn:aws:iam::123456789012:role/turbot_guardrails). Enter this after creating the role. |
Deploy the IAM Role
Click CloudFormation Template or Terraform Template to download a pre-configured template with your settings (partition, role name, External ID, and permissions) already filled in. Deploy this template in your AWS account to create the role.
CloudFormation deployment
- Open the AWS CloudFormation console in the target account.
- Select Create Stack > With new resources.
- Upload the downloaded template.
- Enter a stack name (e.g.,
turbot-guardrails-access). - Review parameters (pre-filled) and click Next through to Submit.
- Wait for CREATE_COMPLETE.
AWS CLI deployment
aws cloudformation create-stack \
--stack-name turbot-guardrails-access \
--template-body file://guardrails-access-role-template.yaml \
--capabilities CAPABILITY_NAMED_IAM
Wait for completion:
aws cloudformation wait stack-create-complete \
--stack-name turbot-guardrails-access
After deploying, copy the Role ARN from the CloudFormation stack outputs and paste it into the Role ARN field.
Step 4: Test the Connection
After you enter the Role ARN, click Continue. The wizard assumes the role from the Guardrails host account to confirm access. On success, you'll see Connection Successful! with the verified account ID and the assumed-role identity.

Click Continue to proceed.
[!NOTE] If the test fails, the External ID or Role ARN doesn't match the deployed role, or the role's trust policy doesn't trust the Guardrails host account. See Cross-Account Trust.
Step 5: Choose a Destination Folder
Select where the account should live in your Guardrails resource hierarchy, then click Continue. Use Create Folder if you want a new location.
Step 6: Review and Connect
Review the destination folder, connectivity settings, and connection test result, then click Connect AWS Account.
Guardrails creates the account resource and begins discovering resources. Discovery typically takes a few minutes; CMDB and Discovery controls are enabled by default.

What Permissions to Grant
The Permission Features toggles determine the CloudFormation template content. If you're creating the role manually:
| Use Case | Permissions |
|---|---|
| Full remediation | arn:aws:iam::aws:policy/AdministratorAccess |
| Read-only + global event handlers | ReadOnlyAccess + custom policy for EventBridge/SNS (see CloudFormation templates) |
| Read-only + regional event handlers | ReadOnlyAccess + custom policy for EventBridge/SNS scoped to turbot_aws_api_events* and turbot_aws_api_handler* |
| Mixed remediation | ReadOnlyAccess + AmazonSNSFullAccess + CloudWatchEventsFullAccess + service-specific policies as needed |
| Budget monitoring | Add ce:GetCostForecast and ce:GetCostAndUsage |
Cross-Account Trust
The role's trust policy must allow the Guardrails host account to assume it:
| Environment | Trusted Account ID |
|---|---|
| Turbot Cloud (US) | 287590803701 |
| Turbot Cloud (EU) | 255798382450 |
| Enterprise | Your Guardrails installation account ID |
External ID
The External ID prevents the confused deputy problem. Guardrails auto-generates one unique to your workspace. When External ID Protection is set to Protected, you must use the auto-generated format.
CloudFormation Templates
The wizard generates these automatically based on your Permission Features selections. For reference, here are the templates for manual use:
ReadOnly + Global Event Handlers (recommended)
AWSTemplateFormatVersion: '2010-09-09'
Parameters:
AccessRoleName:
Type: String
Default: turbot_guardrails
AccessPolicyName:
Type: String
Default: turbot_guardrails_access_policy
AccessRoleExternalId:
Type: String
Description: The External ID from your Guardrails workspace
EventHandlerRoleName:
Type: String
Default: turbot_guardrails_events_role
GuardrailsIamPath:
Type: String
Default: "/"
GuardrailsAccountId:
Type: String
Default: '287590803701'
Resources:
GuardrailsAccessRole:
Type: "AWS::IAM::Role"
Properties:
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Principal:
AWS: !Sub "arn:aws:iam::${GuardrailsAccountId}:root"
Action: "sts:AssumeRole"
Condition:
StringEquals:
"sts:ExternalId": !Ref AccessRoleExternalId
Path: !Ref GuardrailsIamPath
ManagedPolicyArns:
- "arn:aws:iam::aws:policy/ReadOnlyAccess"
RoleName: !Ref AccessRoleName
GuardrailsAccessPolicy:
Type: "AWS::IAM::Policy"
Properties:
PolicyName: !Ref AccessPolicyName
Roles:
- !Ref AccessRoleName
PolicyDocument:
Version: 2012-10-17
Statement:
- Sid: PassRoleToAWS
Effect: Allow
Action:
- "iam:PassRole"
- "iam:GetRole"
Resource:
- !GetAtt EventHandlersGlobalRole.Arn
- Sid: TurbotEvents
Effect: Allow
Action:
- "events:PutEvents"
- "events:EnableRule"
- "events:DisableRule"
- "events:PutRule"
- "events:DeleteRule"
- "events:PutTargets"
- "events:RemoveTargets"
- "events:TagResource"
- "events:UntagResource"
Resource:
- !Sub "arn:aws:events:*:${AWS::AccountId}:rule/turbot_aws_api_events*"
- Sid: TurbotSNS
Effect: Allow
Action:
- "sns:TagResource"
- "sns:UntagResource"
- "sns:CreateTopic"
- "sns:DeleteTopic"
- "sns:SetTopicAttributes"
- "sns:Publish"
- "sns:Subscribe"
- "sns:ConfirmSubscription"
- "sns:AddPermission"
- "sns:RemovePermission"
- "sns:Unsubscribe"
Resource:
- !Sub "arn:aws:sns:*:${AWS::AccountId}:turbot_aws_api_handler*"
- !Sub "arn:aws:sns:*:${AWS::AccountId}:turbot_aws_api_handler*:*"
DependsOn:
- GuardrailsAccessRole
EventHandlersGlobalRole:
Type: 'AWS::IAM::Role'
Properties:
RoleName: !Ref EventHandlerRoleName
Path: !Ref GuardrailsIamPath
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Action: "sts:AssumeRole"
Effect: "Allow"
Principal:
Service: "events.amazonaws.com"
Policies:
- PolicyName: "aws_api_events_policy"
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: "Allow"
Action: "events:PutEvents"
Resource: !Sub "arn:aws:events:*:${AWS::AccountId}:event-bus/default"
Full AdministratorAccess
AWSTemplateFormatVersion: "2010-09-09"
Parameters:
RoleName:
Type: String
Default: turbot_guardrails
TurbotAccountId:
Type: String
Default: 287590803701
TurbotExternalId:
Type: String
NoEcho: True
MinLength: 1
Resources:
TurbotSuperuserRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Principal:
AWS: !Sub arn:aws:iam::${TurbotAccountId}:root
Action: sts:AssumeRole
Condition:
StringEquals:
sts:ExternalId: !Ref TurbotExternalId
Path: /turbot/core/
ManagedPolicyArns:
- "arn:aws:iam::aws:policy/AdministratorAccess"
RoleName: !Ref RoleName
Import via Terraform
resource "turbot_resource" "account" {
parent = "id-of-parent-folder"
type = "tmod:@turbot/aws#/resource/types/account"
metadata = jsonencode({
"aws" : { "accountId" : "123456789012", "partition" : "aws" }
})
data = jsonencode({ "Id" : "123456789012" })
}
resource "turbot_policy_setting" "turbotIamRole" {
resource = turbot_resource.account.id
type = "tmod:@turbot/aws#/policy/types/turbotIamRole"
value = "arn:aws:iam::123456789012:role/turbot_guardrails"
}
resource "turbot_policy_setting" "turbotIamRoleExternalId" {
resource = turbot_resource.account.id
type = "tmod:@turbot/aws#/policy/types/turbotIamRoleExternalId"
value = "your-external-id"
}
Post-Import Validation
After importing, verify the account is fully operational:
AWS > Account > CMDBcontrol inok: confirms the role and permissions work.- Policy values clearing
tbd: all policy values should reachokorskipped. Clear these before checking controls. - Controls clearing
tbd: all controls should reachok,alarm, orskipped. - Event handling: if enabled,
AWS > Turbot > Event HandlerorAWS > Turbot > Event Pollercontrols should beok.
[!TIP] Use the run_controls_batches script with filter
--filter "resourceId:'<ARN>' state:tbd"to rerun stuck controls.
Troubleshooting
| Issue | Solution |
|---|---|
| CMDB control in error | Verify the Role ARN and External ID. Check the role has at least ReadOnlyAccess. |
| Access Denied during discovery | The IAM role lacks permissions for the failing service. Add the required policy. |
| Controls stuck in TBD | Wait for policy values to clear first. Use run_controls_batches to rerun. |
| Further assistance | Open a Support Ticket |