Updated amazon.py for the new ami scripts