FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
docker-lambda/examples/python/lambda_function.py at python2.7 · forward3d/docker-lambda · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
forward3d
/
docker-lambda
Public
forked from
lambci/docker-lambda
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
5
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
docker-lambda
/
examples
/
python
/
lambda_function.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
33 lines (29 loc) · 902 Bytes
Breadcrumbs
docker-lambda
/
examples
/
python
/
lambda_function.py
Copy path
File metadata and controls
33 lines (29 loc) · 902 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from
__future__
import
print_function
import
os
import
sys
import
subprocess
# Just a test lambda, run with:
# docker run --rm -v "$PWD":/var/task lambci/lambda:python2.7
# OR
# docker run --rm -v "$PWD":/var/task lambci/lambda:python3.6
# OR
# docker run --rm -v "$PWD":/var/task lambci/lambda:python3.7 lambda_function.lambda_handler
def
lambda_handler
(
event
,
context
):
context
.
log
(
'Hello!'
)
context
.
log
(
'Hmmm, does not add newlines in 3.7?'
)
context
.
log
(
'
\n
'
)
print
(
sys
.
executable
)
print
(
sys
.
argv
)
print
(
os
.
getcwd
())
print
(
__file__
)
print
(
os
.
environ
)
print
(
context
.
__dict__
)
return
{
"executable"
:
str
(
sys
.
executable
),
"sys.argv"
:
str
(
sys
.
argv
),
"os.getcwd"
:
str
(
os
.
getcwd
()),
"__file__"
:
str
(
__file__
),
"os.environ"
:
str
(
os
.
environ
),
"context.__dict__"
:
str
(
context
.
__dict__
),
"event"
:
event
}
Back
|
FazBrowse Home
|
New Git URL