revise aws.py with Python class