merging in some generic changes from aws branch