Terraform creating role with missing AccessKeyId
In the assume_role_policy of your IAM role
"Service" : "eks.amazonaws.com"
should be changed to
"Service" : "ec2.amazonaws.com"
If your role is going to be used by an EC2 instance, the allowed principal needs to be ec2.amazonaws.com
. You might also want to review the managed policies you are attaching to the role, they are more suitable for an EKS cluster and not a bastion host.