Background:
- Autoscaling Group for EC2 instances
- The EC2 instance is enabled for SSM Connect, so when you connect to the EC2 instance for browser based ssh access. You are logged in as ssm-user
- I am trying to have kubeconfig installed for kubectl to interact with specific EKS clusters. But the user data for the EC2 instance installs the kubeconfig for root
Question
- How can I ensure the user data script is executed for user ssm-user? `