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. 
I have tried the:
[scripts-user, always] to /etc/cloud/cloud.cfg file

Added script to ./scripts/per-boot folder

and
adding script to /etc/rc.local

Yes the permissions were changed to 755 for /etc/rc.local

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. 
If I run the scripts (.sh or .py) manually they work. 
Any suggestions or request for additional info to help?
I read that the use of rc.local is getting deprecated. One thing to try is a line in /etc/crontab like this: 
@reboot  full-path-of-script
If there's a specific user you want to run the script as, you can list it after @reboot.
ec2 run scripts every boot