Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Where should i place my script in amazon instance such that my script should run when my instance boots up?

I tried placing it in rc.local but it didnt help.

My script is about connecting to Amazon S3, uploading some docs & downloading some docs. I have written my script in python and placed it inside a .sh file.

share|improve this question
What's the content of the first line of your .sh file? – Marcel May 7 '13 at 10:57

Scripts from rc.local should run just fine on boot. You may just have a bug in your script. You could try adding logging to your script in the rc.local like such:

/path/to/myscripts/ > /var/log/log.txt 2>&1

Then boot up and check the log for any errors. One usual suspect is not using absolute paths in the scripts so that might be worth a check.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.