We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0085819 commit e79beeeCopy full SHA for e79beee
2 files changed
python/handler.py
@@ -0,0 +1,17 @@
1
+
2
+import json
3
+import datetime
4
5
6
+def endpoint(event, context):
7
+ current_time = datetime.datetime.now().time()
8
+ body = {
9
+ "message": "Hello, the current time is " + str(current_time)
10
+ }
11
12
+ response = {
13
+ "statusCode": 200,
14
+ "body": json.dumps(body)
15
16
17
+ return response
serverless.yaml
@@ -33,3 +33,11 @@ functions:
33
- DIRECTORY=simple
34
environment:
35
SIMPLE_MSG: Hello
36
37
+ python:
38
+ handler: handler.endpoint
39
+ description: "python Lambda compatible"
40
+ runtime: https://raw.githubusercontent.com/triggermesh/aws-python-runtime/master/python-3.7/buildtemplate.yaml
41
+ buildargs:
42
+ - DIRECTORY=python
43
0 commit comments