factor out aws as a module