Precise IAM Role Delegation & Spoke Orchestration
Multi-Account Identity Lifecycle
This flow details how the onboarding script initializes the EKSManagerAgentRole and the EKSManagerAdmin roles to create a secure, cross-account management plane — with no persistent credentials and no inbound access required.
The diagram below shows the full cross-account topology that the onboarding script produces. Expand each phase below for the precise steps.
Management account (top-left) · Hub / shared services (bottom-left) · EKS organizational unit spokes (right)
The script runs once with org-level credentials, then hands off to the sandboxed agent for all future operations.
EKSManagerAdmin, deletion of KMS keys, billing access, cost explorer, and sensitive org management actions. This layer is enforced by AWS Organizations and cannot be overridden by any role inside the OU.EKSManagerAdmin IAM role and sets its trust policy to the ARN of EKSManagerAgentRole in the hub account.OrganizationAccountAccessRole into the hub / shared services account. This role is created automatically by AWS Organizations in every member account — no manual setup required.t3.medium is provisioned in the hub account using the provided VPC, subnet, and security group. The EKSManagerAgentRole is created and attached as the instance profile. The agent software is installed and started. No long-lived credentials are stored anywhere.| Parameter | Description |
|---|---|
| --instance-name | Name tag for the EC2 agent VM |
| --vpc-id | VPC where the agent VM will be created e.g. vpc-xxxxxxxx |
| --subnet-id | Subnet for agent VM placement — must have a NAT gateway route for outbound internet access |
| --security-group-id | Security group for the agent VM. Outbound 443 only — no inbound rules required. SSM access is used for shell access in place of SSH. |
| --account-id | Hub / shared services AWS account number where the agent VM will be provisioned |
| --region | AWS region for agent VM, ECR registry, and Secrets Manager namespace e.g. eu-west-1 |
| --eks-ou-id | EKS Organisational Unit ID — SCP attachment target and StackSet deployment scope e.g. ou-xxxx-xxxxxxxx |
| --eks-admin-arn | IAM role or SSO permission set role ARN granted cluster-admin on all spoke clusters. For IAM Identity Center, use the consistent role ARN pattern across accounts e.g. arn:aws:iam::*:role/AWSReservedSSO_EKSAdmin_xxxx |
organizations:ListAccounts scoped to the EKS OU to enumerate spoke accounts. This is a read-only operation — the agent has no write access to Organizations at any point in Phase 2.sts:AssumeRole using its instance profile. This returns a scoped session that is used for all subsequent operations in that account. The session expires automatically — no credentials are persisted.| Policy | Purpose |
|---|---|
| AmazonEKSWorkerNodePolicy | Core EKS node registration |
| AmazonEC2ContainerRegistryReadOnly | ECR image pull from hub |
| AmazonEKS_CNI_Policy | VPC networking for pods |
| AmazonSSMManagedInstanceCore | SSM Session Manager access |
| AutoScalingFullAccess | Node group scaling |
| AmazonEBSCSIDriverPolicy | Persistent volume support |
sts:AssumeRole is needed at runtime. The agent's credentials are never present inside the cluster.AssumeRole required at runtime.route53:ChangeResourceRecordSets on the cluster zone only.EKSManagerAdmin into it with the correct trust policy. No manual intervention is required — the agent detects the new account on its next scan via org reader and begins Phase 2 provisioning.EKSManagerAdmin itself cannot modify the SCP, delete KMS keys, or access billing — the deny is unconditional and applies to all principals including root./EksManager/* namespace. For each secret you define which clusters and namespaces it should be deployed to. Deployment is on-demand — the agent pushes the secret as a Kubernetes secret only when triggered by you. Secrets never transit the EKS Manager server.sts:AssumeRole at runtime. A misconfiguration or compromise in one spoke account cannot propagate to another.Every role in the management plane and what it can do.
The script runs from AWS Cloud Shell in under 15 minutes. No inbound firewall rules, no VPN, no persistent credentials on our side.