Overview
Aurora integrates with AWS using IAM role assumption with an External ID for secure cross-account access. Unlike traditional access keys, this method provides better security and auditability.What Aurora Can Access
Once authenticated, Aurora can discover and manage:- EKS Clusters: Elastic Kubernetes Service clusters
- EC2 Instances: Virtual machines and auto-scaling groups
- RDS Databases: Relational database instances
- S3 Buckets: Object storage
- Lambda Functions: Serverless compute
- VPCs: Virtual Private Cloud networking
- ECS/Fargate: Container orchestration services
- CloudFormation Stacks: Infrastructure as code
- IAM Roles: Identity and access management
- All AWS Resources: Via Resource Explorer 2 API
Prerequisites
1
AWS Account
You need an AWS account with administrative access
2
Aurora AWS Account
Aurora must have AWS credentials configured (
AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY)3
IAM Permissions
You need permissions to create IAM roles and trust policies in your AWS account
Environment Variables
Configure these environment variables in Aurora’s.env file:
Authentication Flow
Aurora uses IAM role assumption with External ID for secure cross-account access:1
Create IAM Role
In your AWS account, create an IAM role with a trust policy that allows Aurora to assume it
2
Configure External ID
Use the External ID provided by Aurora in the workspace settings (prevents confused deputy attacks)
3
Attach Policies
Attach necessary IAM policies to the role (ReadOnlyAccess for Ask mode, PowerUserAccess for Do mode)
4
Provide Role ARN
Enter the Role ARN in Aurora’s UI
5
Validate Assumption
Aurora validates it can assume the role using STS AssumeRole API
6
Store Connection
Role ARN is stored in the
user_connections table (single source of truth)Setup Instructions
Step 1: Get Your External ID
1
Open Aurora Workspace Settings
Navigate to your workspace in the Aurora UI
2
Find AWS Section
Go to the AWS integration settings
3
Copy External ID
Copy the External ID displayed (e.g.,
a1b2c3d4-e5f6-7890-abcd-ef1234567890)Step 2: Create IAM Role in AWS Console
1
Open IAM Console
Go to AWS IAM Console > Roles > Create role
2
Select Trusted Entity
Choose AWS account as the trusted entity type
3
Enter Aurora Account ID
Enter Aurora’s AWS account ID (displayed in the Aurora UI)
4
Require External ID
Check Require external ID and paste the External ID from Aurora
5
Attach Permissions
For Ask mode (read-only): Attach
ReadOnlyAccess managed policyFor Do mode (full management): Attach PowerUserAccess or create a custom policy6
Name the Role
Name it something like
AuroraAccessRole7
Create Role
Click Create role and copy the Role ARN
Step 3: Configure Aurora
1
Enter Role ARN
In Aurora UI, paste the Role ARN (e.g.,
arn:aws:iam::123456789012:role/AuroraAccessRole)2
Optional: Read-Only Role
For Ask mode, optionally provide a separate read-only Role ARN
3
Test Connection
Click Connect to validate Aurora can assume the role
4
Verify Access
Aurora will call
sts:GetCallerIdentity to verify the assumption worksTrust Policy Example
The IAM role in your account should have a trust policy like this:AURORA_ACCOUNT_ID: Aurora’s AWS account ID (shown in UI)sts:ExternalId: Your workspace’s External ID (shown in UI)
Permission Policies
Read-Only Access (Ask Mode)
Use the AWS managed policy:- Describe and list all AWS resources
- View configurations and metadata
- Read CloudWatch metrics and logs
- Cannot make any changes to your infrastructure
Full Access (Do Mode)
Use AWS managed policy or create custom:- Create, modify, and delete resources
- Manage EC2, EKS, RDS, Lambda, etc.
- Deploy applications and infrastructure
- Cannot modify IAM users/roles (for security)
ec2:*eks:*rds:*s3:*lambda:*ecs:*cloudformation:*resource-explorer-2:Search
API Endpoints
Check Environment
Get Onboarding Info
Set Role ARN
Get Connection Status
Disconnect AWS
Troubleshooting
Aurora Account Not Configured
Error: “Server configuration error: Unable to determine Aurora’s AWS account ID” Solution:- Ensure Aurora has
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYconfigured - Restart Aurora server after adding credentials
- Verify credentials are valid using
aws sts get-caller-identity
Access Denied
Error: “Access denied when assuming role” Solution:- Verify Trust Policy: Ensure the role’s trust policy includes Aurora’s account ID
- Check External ID: Confirm the External ID in the trust policy matches your workspace’s External ID
- Validate Principal: Trust policy principal should be
arn:aws:iam::AURORA_ACCOUNT_ID:root - Review IAM Permissions: Aurora’s credentials must have
sts:AssumeRolepermission - Check Role Name: Ensure the Role ARN is correct and the role exists
Invalid Role ARN Format
Error: “Invalid role ARN format” Solution:- Role ARN must start with
arn:aws:iam:: - Format:
arn:aws:iam::ACCOUNT_ID:role/ROLE_NAME - Do not include session name or other suffixes
Role Assumption Failed
Error: “AWS role assumption failed” Solution:- Test the role assumption manually:
- Check CloudTrail logs for detailed error messages
- Verify the role has not been deleted
- Ensure the role is in the correct AWS account
Insufficient Permissions
Error: “Failed to list resources” or similar permission errors Solution:- Verify the role has the necessary permission policies attached
- For resource discovery, ensure
resource-explorer-2:Searchpermission - For EKS, ensure
eks:DescribeClusterandeks:ListClusters - Review CloudTrail for specific API calls that failed
Session Token Expiration
Error: “Session token expired” Solution:- Aurora automatically refreshes session tokens (default 1 hour duration)
- If sessions expire prematurely, check for IAM policy duration limits
- Maximum session duration can be set on the IAM role (up to 12 hours)
Security Considerations
- External ID: Always use the External ID provided by Aurora to prevent confused deputy attacks
- Least Privilege: Only grant the minimum permissions needed for your use case
- Audit Logs: Monitor CloudTrail for all actions performed by Aurora
- Role Naming: Use descriptive role names for easy identification in IAM
- Rotation: Regularly review and rotate Aurora’s AWS credentials
- Read-Only Mode: Use separate read-only roles for Ask mode to limit blast radius
Connection Storage
AWS connections are stored in theuser_connections table with:
- Provider:
aws - Account ID: Extracted from Role ARN
- Role ARN: Full IAM role ARN
- Read-Only Role ARN: Optional separate role for Ask mode
- Workspace External ID: Stored in
workspacestable for STS calls
Next Steps
After connecting AWS:- Aurora will discover your AWS infrastructure using Resource Explorer 2
- View discovered resources in the Aurora dashboard
- Use Aurora’s AI agent to manage AWS resources
- Deploy applications to EKS clusters
- Monitor costs and optimize resource usage