diff --git a/moto/awslambda/models.py b/moto/awslambda/models.py
index <HASH>..<HASH> 100644
--- a/moto/awslambda/models.py
+++ b/moto/awslambda/models.py
@@ -115,7 +115,7 @@ class LambdaFunction(object):
             #print "moto_lambda_debug: ", mycode
             sys.stdout = codeOut
             sys.stderr = codeErr
-            exec mycode
+            exec(mycode)
             exec_err = codeErr.getvalue()
             exec_out = codeOut.getvalue()
             result = "\n".join([exec_out, exec_err])
attmpt 3 not liking Python 3 very much at the moment