I want to sync a s3 bucket on ec2 instance and I want to do it using ssm run-command. The problem is ssm run-command always executes as root user which does not have s3 permissions. how to run ssm run-commands as ubuntu user.
Asked
Active
Viewed 4,038 times
6
-
solved it, I added a bucket policy with the ssm role as principle – rahulk9 May 17 '17 at 10:25
-
Can you use SSM with a different user though? – freethebees May 25 '17 at 15:49
-
I haven't tried with different user. – rahulk9 May 26 '17 at 05:29
-
9One workaround I've used is to run the command `runuser -l ubuntu -c '
'`. It's hideous really, but it does work. – freethebees May 26 '17 at 11:28