title: Use python to shut down instance script runs on
body: <p>I am running machine learning scripts that take a long time to finish. I want to run them on AWS on a faster processor and stop the instance when it finishes.</p>
  
  <p>Can <a href="https://pypi.python.org/pypi/boto/" rel="nofollow noreferrer">boto</a> be used within the running script to stop its own instance? Is there a simpler way?</p>