refactoring to run from rake task
adding aws-flow gem