[Solved] AWS | Syntax error in module’: invalid syntax


EDIT: As pointed by @Petesh, the issue comes from stompy(external library), which hasn’t been ported to Python3.

If you check the source code, you can find this:

except socket.timeout, exc:

which is invalid syntax for python3+

If you run your Lambdas in python3.6/3.7 environment, the syntax is invalid.

The issue might go away if you choose python 2.7, but you will also have to adjust your code, libraries, etc.

24

solved AWS | Syntax error in module’: invalid syntax