Adding Your AWS Account
Complete guide to connecting AWS accounts to CloudWrangler
Introduction
Connecting your AWS account to CloudWrangler is quick and secure. This guide covers all three setup methods and helps you choose the right one for your needs.

CloudWrangler uses IAM role assumption for secure, read-only access to your AWS resources. We never store AWS credentials.
Before You Begin
Prerequisites
- AWS account with administrator access
- Your 12-digit AWS Account ID
- Permission to create IAM roles
- (Optional) AWS CLI installed for CLI method
What You'll Need
- Account Name: A friendly name for identification (e.g., "Production", "Development")
- AWS Account ID: Your 12-digit AWS account identifier
- Regions: Which AWS regions to monitor (defaults to all)
Section 1: Account Information
When you start adding an account, you'll provide basic information:
Account Name
Choose a descriptive name that helps you identify this account:
- "Production" - Your production environment
- "Development" - Dev/test environment
- "Customer XYZ" - Client-specific account
- "Billing Account" - Your organization's billing account
AWS Account ID
Your 12-digit AWS account identifier. Find it:
- AWS Console: Top right corner, click on account name
- AWS CLI:
aws sts get-caller-identity --query Account --output text - Billing: Account Settings page
Regions to Monitor
Select which AWS regions CloudWrangler should scan:
- All Regions (recommended) - Discovers resources in all AWS regions
- Specific Regions - Choose only the regions you use
- Common choices: us-east-1, us-west-2, eu-west-1
Selecting all regions ensures you don't miss resources but may increase discovery time slightly.
Section 2: Setup Methods
CloudWrangler offers three methods to create the required IAM role. Choose the one that best fits your workflow.
Method 1: CloudFormation (Recommended)
CloudFormation is the fastest and most reliable method. It automatically creates the IAM role with correct permissions.

Why CloudFormation?
- Fastest setup (2-3 minutes)
- Automatically configures all permissions correctly
- Easy to audit and update
- Supports Infrastructure as Code workflows
- Can be deployed via CLI or Console
Step-by-Step Instructions:
-
Get the CloudFormation URL
- In the CloudWrangler UI, click CloudFormation Quick Create
- This generates a pre-filled CloudFormation URL
-
Open AWS CloudFormation Console
- The link opens in a new tab
- You'll be in the AWS CloudFormation Console
- The template is already selected
-
Review the Template
- Click View in Designer (optional) to see the resources
- The template creates:
- IAM role named
CloudWranglerAccessRole - Trust policy with External ID protection
- Read-only permissions policy
- IAM role named
-
Acknowledge IAM Resource Creation
- Check the box: "I acknowledge that AWS CloudFormation might create IAM resources"
- This is required for any template that creates IAM roles
-
Create the Stack
- Click Create stack
- Wait 2-3 minutes for stack creation to complete
- Status will change to
CREATE_COMPLETE
-
Verify in CloudWrangler
- Return to the CloudWrangler tab
- Click Verify Connection
- Connection status should show green checkmark
CloudFormation Template Details:
The template creates a single IAM role with:
Troubleshooting CloudFormation:
- "Role already exists" - Delete the existing role or use a different name
- "Insufficient permissions" - You need IAM administrator access
- Stack fails to create - Check CloudFormation events tab for details
- Can't find the stack - Make sure you're in the correct AWS region
Method 2: AWS Console Manual Setup
If you prefer manual configuration or can't use CloudFormation, you can create the role manually in the AWS Console.

When to Use Console Setup:
- Your organization doesn't allow CloudFormation
- You want to understand each permission manually
- You need to customize the role name
- You're learning AWS IAM concepts
Step-by-Step Instructions:
-
Open IAM Console
- Go to AWS Console → IAM → Roles
- Click Create role
-
Select Trusted Entity
- Choose AWS account
- Select Another AWS account
- Enter Account ID:
119632503960 - Check Require external ID
- Enter your CloudWrangler Workspace ID (shown in UI)
-
Attach Permissions Policy
- Search for
ReadOnlyAccess - Check the box next to ReadOnlyAccess (AWS managed policy)
- Click Next
- Search for
-
Name the Role
- Role name:
CloudWranglerAccessRole - Description: "Read-only access for CloudWrangler infrastructure monitoring"
- Click Create role
- Role name:
-
Verify in CloudWrangler
- Return to CloudWrangler
- Click Verify Connection
- Connection should succeed
Trust Policy Document:
The trust policy should look like this:
Permissions Policy:
Attach the AWS managed policy: arn:aws:iam::aws:policy/ReadOnlyAccess
Troubleshooting Manual Setup:
- External ID mismatch - Copy the exact ID from CloudWrangler UI
- Wrong account ID - CloudWrangler account must be
119632503960 - Policy not attached - Verify
ReadOnlyAccesspolicy is attached to the role - Can't assume role - Check trust policy syntax and External ID
Method 3: AWS CLI
For DevOps teams and automation, use the AWS CLI to create the role programmatically.

When to Use CLI:
- You're automating account onboarding
- You prefer command-line tools
- You're adding multiple accounts
- You want to script the process
Step-by-Step Instructions:
- Set Environment Variables
- Create Trust Policy File
- Create the IAM Role
- Attach ReadOnlyAccess Policy
- Verify in CloudWrangler
- Add the account in the UI
- Click Verify Connection
Complete Script:
Here's a complete script to create the role:
Troubleshooting CLI:
- "Role already exists" - Delete the existing role with
aws iam delete-role - "Access denied" - Ensure your AWS CLI credentials have IAM permissions
- "Invalid parameter" - Check JSON syntax in trust-policy.json
- Can't attach policy - Role must exist before attaching policies
Section 3: Verification
After creating the IAM role, CloudWrangler verifies the connection.
How Verification Works
CloudWrangler attempts to:
- Assume the IAM role using the External ID
- Call
sts:GetCallerIdentityto verify access - List EC2 regions to test read permissions
- Store the connection if successful
Verification States
Success (Green Checkmark)
- Connection verified successfully
- Role can be assumed
- Read permissions confirmed
- Resource discovery can begin
Pending (Yellow Warning)
- Verification not yet attempted
- Waiting for background job
- Click "Verify Now" to trigger manually
Failed (Red Error)
- Cannot assume role
- Permission issues detected
- See error message for details
- Check troubleshooting guide below
Manual Verification
To manually verify the connection:
- Click Verify Connection button
- Wait 5-10 seconds for result
- Green checkmark = Success
- Red error = See error message
Troubleshooting Verification Failures
Error: "Access Denied"
- Check the trust policy includes the correct External ID
- Verify CloudWrangler account ID is
119632503960 - Ensure role exists in your AWS account
Error: "Role not found"
- Double-check the role name (default:
CloudWranglerAccessRole) - Verify you created the role in the correct AWS account
- Wait a few minutes for IAM to propagate
Error: "External ID mismatch"
- External ID must match your Workspace ID exactly
- Copy the ID from CloudWrangler UI
- Update the trust policy with correct External ID
Error: "Insufficient permissions"
- Verify
ReadOnlyAccesspolicy is attached - Check the policy attachment was successful
- Try detaching and re-attaching the policy
Section 4: Managing Multiple Accounts
CloudWrangler supports unlimited AWS accounts for comprehensive infrastructure visibility.

Adding Additional Accounts
To add more AWS accounts:
- Click Add Account button
- Repeat the setup process for each account
- Use the same External ID (Workspace ID) for all accounts
- Each account gets its own IAM role
Best Practices for Multiple Accounts
Naming Convention
- Use descriptive names: "Production", "Staging", "Development"
- Include environment or team: "API-Production", "Frontend-Dev"
- Add customer names for client accounts: "Client-Acme-Prod"
Organization
- Group related accounts (all prod, all dev)
- Use consistent role names across accounts
- Document which accounts are monitored
AWS Organizations
- Create a StackSet to deploy roles across all accounts
- Use consistent External IDs
- Centralize role management
Switching Between Accounts
View data from different accounts:
- Use the Account Selector dropdown in the header
- Select specific account to view its resources
- Choose "All Accounts" for aggregated view
- Filters apply to the selected account
Account Management
Edit Account
- Update account name
- Change enabled regions
- Modify connection settings
Refresh Account
- Manually verify connection
- Trigger resource discovery
- Update resource inventory
Remove Account
- Disconnect from CloudWrangler
- Stop resource discovery
- Archive historical data (optional)
- IAM role remains in your AWS account (you must delete manually)
Multi-Account Cost Savings
With multiple accounts connected:
- View consolidated cost savings across all accounts
- Filter findings by specific accounts
- Compare costs between environments
- Identify cross-account optimization opportunities
Security Considerations
External ID Protection
The External ID prevents "confused deputy" attacks:
- Each workspace has a unique External ID
- All accounts in a workspace use the same External ID
- Only CloudWrangler with your Workspace ID can assume roles
- Never share your External ID publicly
Least Privilege
CloudWrangler follows least-privilege principles:
- Uses AWS managed
ReadOnlyAccesspolicy - Cannot modify any resources
- Cannot delete or create resources
- All API calls appear in CloudTrail
Audit Trail
Monitor CloudWrangler's access:
- All AWS API calls appear in CloudTrail
- Filter by role name:
CloudWranglerAccessRole - Review assumed role sessions
- Alert on unexpected API calls
Revoking Access
To revoke CloudWrangler's access:
-
In AWS: Delete the IAM role
-
In CloudWrangler: Remove the account
- Click Remove on the account card
- Confirm deletion
Access is immediately revoked.
Next Steps
Now that your account is connected:
Service Integrations
Enable VPC Flow Logs and other integrations
Cost Savings
Start discovering cost optimization opportunities
Network Topology
Visualize your VPC architecture
Dashboard Overview
Learn about the CloudWrangler interface
Frequently Asked Questions
Q: How many accounts can I connect? A: Unlimited. CloudWrangler supports as many AWS accounts as you need.
Q: Can I use a custom IAM policy instead of ReadOnlyAccess? A: Yes, but ensure it includes permissions for EC2, RDS, ElastiCache, ELB, VPC, and S3 (for Flow Logs).
Q: Does CloudWrangler support AWS Organizations? A: Yes. You can create a StackSet to deploy the role across all member accounts automatically.
Q: Can I change the role name? A: Yes. Enter a custom role name when adding the account. Just ensure you create the role with that name.
Q: How often does CloudWrangler assume the role? A: During resource discovery (every 12 hours) and when you manually refresh. Sessions last 15 minutes.
Q: Will this increase my AWS costs? A: No. API calls for resource discovery are free. VPC Flow Logs (optional) have costs (~$0.50/GB).
Q: Can CloudWrangler access my data? A: No. ReadOnlyAccess allows listing resources and metadata only. It cannot read S3 bucket contents, RDS data, or secrets.