Great example, but why it is not working with python 3.6 or 3.7? it only works with 2.7
for this to work with python 3.x change the catch statement to
except Exception as e:
I am not sure to which example are you referring in the course but python 2.7 and 3.7 are very different and are not fully compatible, meaning that code written for 2.7 would need to be adapted in most cases to work with 3.7.
I am refering the one which re-enable the cloudtrail logging when stopped.
i am aware that 2.7 and 3.x are different, but anyspecific reason not using 3.x?