title: EC2_HOME is not set. Run AWS Commands from Cron
body: <p>Basicly I'm not sure how to get my aws commands to run in crontab. I know I need to give crontab some environmental variables so that it can run the aws commands but, I don't quite know how to do that. Has anyone been able to do this before?</p>
  
  <pre><code>PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:/home/ec2-user/bin:/opt/aws/bin
  * * * * * export EC2_HOME=/opt/aws/apitools/ec2
  * * * * * export JAVA_HOME=/usr/lib/jvm/jre
  0 8 * * 1-5 ec2-start-instances instance_id
  0 7 * * 1-5 ec2-start-instances instance_id
  0 7 * * 1-5 ec2-start-instances instance_id
  </code></pre>
  
  <p>I am on an EC2 Amazon machine and I'm able to run the aws commands in the EC2-user shell. I'm just having trouble getting the commands to run from crontab.</p>
  
  <p>The mail sent to the ec2 user says "/opt/aws/bin/ec2-start-instances: line 9: EC2_HOME: EC2_HOME is not set"</p>