From: Carl Worth Date: Mon, 12 Oct 2020 02:59:54 +0000 (-0700) Subject: Rename lamdba_function.lambda_handler to turbot_lambda.turbot_lambda X-Git-Url: https://git.cworth.org/git?p=turbot;a=commitdiff_plain;h=2fe5a72db70409f82f58e0ffaf5c492e0f4ebb15 Rename lamdba_function.lambda_handler to turbot_lambda.turbot_lambda 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). --- diff --git a/Makefile b/Makefile index 640c8f0..9c4f334 100644 --- 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 index 53251d2..0000000 --- a/turbot_lambda/lambda_function.py +++ /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 index 0000000..c2459e8 --- /dev/null +++ b/turbot_lambda/turbot_lambda.py @@ -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 + }