refactor Aws into separate class