cloudformation module: add backward-compatible support for Python 3.3+
Merge pull request #2373 from felixonmars/cloudformation-py3

cloudformation module: add backward-compatible support for Python 3.3+. Fixes #2373.