Zero-SSH Private Amazon EKS Bastion with AWS SSM Session Manager and EKS Access Entries
Maintaining a traditional EC2 jump host for private Amazon EKS clusters creates three recurring headaches: open TCP port 22 rules in security groups, shared SSH keys that are hard to revoke, and engineers running mismatc
Maintaining a traditional EC2 jump host for private Amazon EKS clusters creates three recurring headaches: open TCP port 22 rules in security groups, shared SSH keys that are hard to revoke, and engineers running mismatched kubectl or helm versions on laptops.
CoreNova SSM EKS Admin Bastion AMI replaces public SSH jump boxes with an Amazon Linux 2023 bastion in your private subnet, reachable only via AWS Systems Manager Session Manager (x86_64 and Graviton ARM64 across 34 AWS regions, $0.02/hr).
The #1 Activation Trap: error: You must be logged in to the server (Unauthorized)
Most teams launch a private bastion, attach AmazonSSMManagedInstanceCore, run aws eks update-kubeconfig, and immediately hit:
error: You must be logged in to the server (Unauthorized)
Modern Amazon EKS clusters default to EKS Access Entries (API authentication mode) rather than aws-auth ConfigMaps. Until your Bastion IAM Role (or your operator role if using the Identity Relay CloudFormation delivery option) has an Access Entry on the cluster, Kubernetes API rejects every request.
Fix it in two AWS CLI commands:
aws eks create-access-entry \
--cluster-name YOUR_CLUSTER \
--region YOUR_REGION \
--principal-arn arn:aws:iam::123456789012:role/YOUR_EKS_ADMIN_ROLE
aws eks associate-access-policy \
--cluster-name YOUR_CLUSTER \
--region YOUR_REGION \
--principal-arn arn:aws:iam::123456789012:role/YOUR_EKS_ADMIN_ROLE \
--policy-arn arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy \
--access-scope type=cluster
Two CloudFormation Delivery Modes Out of the Box
When subscribing on AWS Marketplace, you do not have to wire IAM or session logging manually. Choose one of the two built-in CloudFormation delivery options:
-
Identity Relay (per-user AWS identity): Starts a local port-forward relay with zero EKS permissions on the EC2 instance role. Each engineer's
kubectltoken is generated from their own local AWS IAM identity, preserving per-user EKS Access Entries and CloudTrail attribution. -
Audited Workstation (streamed shell logs): Uses a dedicated SSM Session document with Run As and CloudWatch Logs streaming, plus pre-installed
kubectl-select,helm,eksctl,k9s,kubectx,kubens, andcorenova-eks-doctor.
Verify everything in under 60 seconds once connected:
aws eks update-kubeconfig --region YOUR_REGION --name YOUR_CLUSTER
corenova-eks-doctor --cluster YOUR_CLUSTER --region YOUR_REGION
kubectl get nodes
Launch on AWS Marketplace (34 Regions, $0.02/hr)
- x86_64: CoreNova SSM EKS Admin Bastion AMI (AL2023, x86_64)
- Graviton ARM64: CoreNova SSM EKS Admin Bastion AMI (AL2023, Graviton ARM64)
- Full activation checklist: CoreNova Hardened AMIs & 1-Click CloudFormation Docs
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.