title: ec2 run scripts every boot
body: <p>I have followed a few posts on here trying to run either a python or shell script on my ec2 instance after every boot not just the first boot. </p>
  
  <p>I have tried the:</p>
  
  <p><strong>[scripts-user, always] to /etc/cloud/cloud.cfg file</strong></p>
  
  <ul>
  <li>Added script to ./scripts/per-boot folder</li>
  </ul>
  
  <p>and</p>
  
  <p><strong>adding script to /etc/rc.local</strong></p>
  
  <ul>
  <li>Yes the permissions were changed to 755 for /etc/rc.local</li>
  </ul>
  
  <p>I am attempting to pipe the output of the file into a file located in the /home/ubuntu/ directory and the file does not contain anything after boot. </p>
  
  <p>If I run the scripts (.sh or .py) manually they work. </p>
  
  <p>Any suggestions or request for additional info to help? </p>