You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cannot get the 'community.aws.aws_ssm' connection to 'become' any other user when connecting to an EC2 via SSM. In this scenario user will not become 'root'. I can connect to the target host fine, but any attempt to become root fails. Example tests:
The results of these and other tests all come back the same: user being 'ssm_user'. The 'ssm_user' definitely does have the permission to elevate to root and can do so manually on the instance fine.
I don't know if this helps people, but in my case I'm using AWX and found a workaround.
I needed to create a machine credential for the job template with the username of 'admin' and no password required. This then allowed 'become' to work. Without that, become would not cause any changes to user after SSM connection. Quite annoying..
Summary
Cannot get the 'community.aws.aws_ssm' connection to 'become' any other user when connecting to an EC2 via SSM. In this scenario user will not become 'root'. I can connect to the target host fine, but any attempt to become root fails. Example tests:
The results of these and other tests all come back the same: user being 'ssm_user'. The 'ssm_user' definitely does have the permission to elevate to root and can do so manually on the instance fine.
Issue Type
Bug Report
Component Name
community.aws.aws_ssm
Ansible Version
Collection Versions
AWS SDK versions
OS / Environment
No response
Steps to Reproduce
Expected Results
I expected the tasks to show the user as 'root'
Actual Results
"stdout": "ssm-user"
Code of Conduct
The text was updated successfully, but these errors were encountered: