refactored AWS