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
Aurora AWS Account
Aurora must have AWS credentials configured (
AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY)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:Create IAM Role
In your AWS account, create an IAM role with a trust policy that allows Aurora to assume it
Configure External ID
Use the External ID provided by Aurora in the workspace settings (prevents confused deputy attacks)
Attach Policies
Attach necessary IAM policies to the role (ReadOnlyAccess for Ask mode, PowerUserAccess for Do mode)
Setup Instructions
Step 1: Get Your External ID
Step 2: Create IAM Role in AWS Console
Open IAM Console
Go to AWS IAM Console > Roles > Create role
Attach Permissions
For Ask mode (read-only): Attach
ReadOnlyAccess managed policyFor Do mode (full management): Attach PowerUserAccess or create a custom policyStep 3: Configure Aurora
Enter Role ARN
In Aurora UI, paste the Role ARN (e.g.,
arn:aws:iam::123456789012:role/AuroraAccessRole)Trust 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