cloudformation: Fixed bug in module_fail. Consistent error handling.

Had to close last pull request.. my repo got wonky.