some python code to distribute work across aws instances