title: standard in must be a tty Python script removing Sudo
body: <p>I am trying to run the command </p>
  
  <pre><code>"sudo service awslogs start" 
  </code></pre>
  
  <p>from a python script. I cannot use 'sudo' so I change the command to </p>
  
  <pre><code>"su -c 'service awslogs start'"
  </code></pre>
  
  <p>but that does not seem to work either. I still get the error</p>
  
  <p>su: user if=/dev/null does not exist </p>
  
  <p>or </p>
  
  <p>standard in must be a tty</p>
  
  <p>Any ideas as to how to fix this?</p>