Refactored aws-hack.