Skip to main content
Connect your AWS accounts to enable CloudThinker agents to analyze costs, audit security, optimize resources, and manage infrastructure at scale. AWS authenticates with an IAM role (AssumeRole) or IAM user access keys; role-based authentication is strongly recommended because it uses short-lived credentials via AWS STS and avoids storing long-term secrets.

Prerequisites

  • An AWS account with IAM administrator access.
  • Permission to create IAM roles or IAM users in the target account.
  • Access to AWS CloudShell or the IAM console for setup.
Role-based authentication (AssumeRole) is strongly preferred. Use access keys only when AssumeRole is not feasible in your environment.

Setup

Multi-account setup

For organizations with multiple AWS accounts:
1

Create the role in each account

Deploy the IAM role using CloudFormation StackSets across all target accounts.
2

Use AWS Organizations

Connect the management account for organization-wide visibility.
3

Add each account

Add account connections individually in CloudThinker.

Connection details

FieldDescriptionExample
Role ARNARN of the IAM role CloudThinker assumes (role-based method)arn:aws:iam::123456789012:role/CloudThinkerAccessRole
External IDSecret ID in the trust policy, provided by CloudThinker
RegionPrimary AWS region for this connectionus-east-1
Access Key IDIAM user key ID (access-keys method only)
Secret Access KeyIAM user secret key (access-keys method only)

Required permissions

Minimum (read-only analysis)

ec2:Describe*
rds:Describe*
s3:GetBucket*, s3:List*
cloudwatch:GetMetric*, cloudwatch:List*
ce:GetCost*, ce:GetReservation*
iam:GetRole, iam:ListRoles
# All minimum permissions, plus:
elasticloadbalancing:Describe*
autoscaling:Describe*
lambda:List*, lambda:GetFunction*
ecs:Describe*, ecs:List*
eks:Describe*, eks:List*
securityhub:Get*, securityhub:List*
guardduty:Get*, guardduty:List*
config:Describe*, config:Get*
cloudtrail:Describe*, cloudtrail:Get*
Start with minimum permissions and expand as needed. Enable Cost Explorer in the AWS Console before connecting — it can take up to 24 hours to activate on new accounts.

Agent capabilities

Once connected, agents can analyze and optimize your AWS resources.
AgentAWS capabilities
AlexCost analysis, EC2 right-sizing, Reserved Instance recommendations, resource optimization
OliverSecurity Hub findings, IAM audits, compliance checks, vulnerability assessment
TonyRDS performance analysis, Aurora optimization, DynamoDB tuning
KaiEKS cluster management, Fargate optimization, container analysis

Verify the connection

@alex run an AWS account check and list the connected account ID and active regions

Example prompts

@alex analyze EC2 costs over the last 30 days and #recommend right-sizing opportunities
@oliver audit IAM roles and flag any with excessive permissions or missing MFA requirements
@kai check EKS cluster health across all connected regions and #report any failing pods

Troubleshooting

Verify the IAM role has the required permissions. Check that the trust policy includes CloudThinker’s account ID, confirm the External ID matches exactly, and ensure the role ARN is correct.
Enable Cost Explorer in the AWS Console (takes up to 24 hours to activate). Verify ce:GetCost* permissions are granted and check that billing preferences allow programmatic access.
Verify CloudWatch metrics are being collected. Check that the region selection includes all relevant regions and confirm services are running and generating data.
Check network connectivity to AWS APIs. Verify no VPC endpoints are blocking access and try connecting from a different region.

Security

  • Least privilege — grant only the permissions the agents need for your use case; start read-only and widen later.
  • Read-only by default — use read-only credentials unless you want agents to make changes through this connection.
  • Rotate credentials — rotate keys and tokens on your normal schedule; CloudThinker picks up the new value when you update the connection.
  • Revoke on offboarding — remove the credential at the provider when you delete a connection or a teammate leaves.
  • Use IAM roles — prefer AssumeRole over long-term access keys; IAM roles use short-lived STS credentials that auto-rotate and require no secret storage.
  • Enable CloudTrail — audit all API calls made through the CloudThinker connection to maintain a complete activity log.

Alex Agent

AWS-focused cloud optimization agent

Bring Your Own Key (BYOK)

Use your own AWS Bedrock credentials for unlimited LLM usage