The AWS APIs Operator is the component that lets xpander agents interact with AWS services in your account — Redshift, Athena, Power BI, and more. In a self-hosted deployment, the operator runs inside your VPC and uses IAM roles with EKS Pod Identity to authenticate. No AWS credentials leave your cluster.This guide covers the IAM and networking setup that your IT or platform team needs to complete before developers can use AWS connectors in their agents.
When an agent calls an AWS connector (e.g., “query this Redshift table”), the request flows through the AI Gateway, which assumes an IAM role via Pod Identity. The role is scoped to specific AWS services and resources. The AI Gateway then calls the AWS API on behalf of the agent — all within your VPC.The IAM role requires three trust principals:
Principal
Purpose
pods.eks.amazonaws.com
EKS Pod Identity — lets xpander pods assume the role
arn:aws:iam::<ACCOUNT_ID>:root
Cross-account assume with External ID (organizationId) for the xpander platform
The role’s own ARN
Self-assume — the AI Gateway re-assumes its own role internally to get service-specific credentials
The self-assume statement must not have an ExternalId condition. The AI Gateway calls sts:AssumeRole on its own role without passing an external ID. If this statement has a condition, you’ll get AccessDenied errors.
If the AWS service runs inside your VPC (e.g., a private Redshift cluster), ensure the service’s security group allows traffic from the EKS cluster security group:
Copy
Ask AI
# Get the EKS cluster security groupEKS_SG=$(aws eks describe-cluster --name <CLUSTER_NAME> \ --region <REGION> --profile <PROFILE> \ --query 'cluster.resourcesVpcConfig.clusterSecurityGroupId' --output text)# Allow from EKS to the service (e.g., Redshift port 5439)aws ec2 authorize-security-group-ingress \ --group-id <SERVICE_SG_ID> \ --protocol tcp --port <SERVICE_PORT> \ --source-group $EKS_SG \ --region <REGION> --profile <PROFILE>
For services outside your VPC (e.g., S3, Athena), no security group changes are needed — the NAT Gateway handles outbound access.
Instead of storing connector API keys directly in xpander, you can pull them from AWS Secrets Manager at runtime. This keeps credentials out of xpander’s database entirely.
Use specific secret ARNs instead of wildcards. Organize secrets by environment (xpander/prod/, xpander/staging/) and enable CloudTrail for audit logging.
Add sts:TagSession to both the trust policy AND as a permission policy on the role.
sts:AssumeRole AccessDenied (self-assume)
The AI Gateway re-assumes its own role internally. The trust policy needs a SelfAssume statement for the role’s own ARN without an ExternalId condition. Also add sts:AssumeRole as a permission policy.
Service connection timeout
Check the service’s security group allows the relevant port from the EKS cluster security group. For VPC-internal services, they must be in the same VPC or have VPC peering/transit gateway configured.