-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to start a new session as ssm-user with runAS option #431
Comments
This is expected behavior. If "run as" feature is not enabled, Session Manager will create The default "run as" user is ssm-user. So if you want to run as ssm-user, there is no need to specify it in the preferences. |
I'm not specifying it in the preferences. it's specified via tags on the IAM user as outlined here: https://docs.aws.amazon.com/systems-manager/latest/userguide/session-preferences-run-as.html A non admin user is being set in preferences as the default. If the IAM user however is tagged with runAs = ssm-user then it should create the account. |
It's the same. If you use Session Manager to start a session on the same host without RunAs configured for the first time, then Session Manager will create ssm-user on the host on your behalf. If you have not done so, and directly attempt to run as "ssm-user", either through preferences or the IAM user tag, the user must exist first. Hope this clarifies the confusion. Cheers, |
yes, but why is this the default behaviour? The issue here: #217 is basically that the default behaviour is stupid. |
The workaround for this is to create "ssm-user" yourself in the cloud-init script.
If you are using terraform this would be in your "user_data_base64" |
Reopening #217.
Without "run as" option the "ssm-user" is created during the first session. If I configure SSM and set "run as" and as default user use "ssm-user" I'm unable to login into new vm's.
I get an error "Unable to start shell: failed to start pty since RunAs user ssm-user does not exist"
Fix PR here: #394
The text was updated successfully, but these errors were encountered: