Problem
When connecting via AWS SSM Session Manager, ssm-user is prompted for a password when running sudo -i:
ssm-user@ip-10-1-101-9:/var/snap/amazon-ssm-agent/11797$ sudo -i
[sudo] password for ssm-user:
Proposed Solution
Add a sudoers entry for ssm-user in Hiera data (common.yaml) using the saz/sudo module:
sudo::configs:
'ssm-user':
'content' : 'ssm-user ALL=(ALL) NOPASSWD: ALL'
'priority' : 10
This should be added to common.yaml in the relevant environments (development, sandbox, production).
Using a direct sudoers entry is preferred over adding to the admin group via accounts::user_list since ssm-user is created by the SSM agent, not by Puppet, and managing it through accounts might conflict.
Problem
When connecting via AWS SSM Session Manager,
ssm-useris prompted for a password when runningsudo -i:Proposed Solution
Add a sudoers entry for
ssm-userin Hiera data (common.yaml) using thesaz/sudomodule:This should be added to
common.yamlin the relevant environments (development, sandbox, production).Using a direct sudoers entry is preferred over adding to the admin group via
accounts::user_listsincessm-useris created by the SSM agent, not by Puppet, and managing it throughaccountsmight conflict.