]> git.cworth.org Git - turbot/commitdiff
Rename lamdba_function.lambda_handler to turbot_lambda.turbot_lambda
authorCarl Worth <cworth@cworth.org>
Mon, 12 Oct 2020 02:59:54 +0000 (19:59 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 12 Oct 2020 03:06:19 +0000 (20:06 -0700)
Now that I realized that the lambda_function.lambda_handler naming
isn't hard-coded in AWS but is instead just a default, (and now that
I've configured it to this instead).

Makefile
turbot_lambda/lambda_function.py [deleted file]
turbot_lambda/turbot_lambda.py [new file with mode: 0644]

index 640c8f0ca4316c74b771d3a6148f7054e6908e75..9c4f334e04b8f85b08b0889236ce647329ce6b41 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -76,7 +76,7 @@ deploy-flask:
 deploy-lambda:
        rm -rf .deploy-lambda-source
        git clone . .deploy-lambda-source
-       (cd .deploy-lambda-source/turbot_lambda; zip ../turbot.zip lambda_function.py)
+       (cd .deploy-lambda-source/turbot_lambda; zip ../turbot.zip turbot_lambda.py)
        (cd .deploy-lambda-source; zip turbot.zip $$(git ls-files -- turbot))
        (cd .deploy-lambda-source; \
                aws lambda update-function-code \
diff --git a/turbot_lambda/lambda_function.py b/turbot_lambda/lambda_function.py
deleted file mode 100644 (file)
index 53251d2..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-from turbot.rot import rot
-
-def lambda_handler(event, context):
-    """Top-level entry point for our lambda function.
-
-    Currently only calls into the rot() function but may become more
-    sophisticated later on."""
-
-    result = rot(event['args'])
-
-    return {
-        'statusCode': 200,
-        'body': result
-    }
diff --git a/turbot_lambda/turbot_lambda.py b/turbot_lambda/turbot_lambda.py
new file mode 100644 (file)
index 0000000..c2459e8
--- /dev/null
@@ -0,0 +1,14 @@
+from turbot.rot import rot
+
+def turbot_lambda(event, context):
+    """Top-level entry point for our lambda function.
+
+    Currently only calls into the rot() function but may become more
+    sophisticated later on."""
+
+    result = rot(event['args'])
+
+    return {
+        'statusCode': 200,
+        'body': result
+    }