Refactor AWS analyzer interface

To make it easier to use as a library