FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
docker-lambda/examples/python/lambda_function.py at master · frapsoft/docker-lambda · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
frapsoft
/
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
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
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
39 lines (35 loc) · 1.13 KB
Breadcrumbs
docker-lambda
/
examples
/
python
/
lambda_function.py
Copy path
File metadata and controls
39 lines (35 loc) · 1.13 KB
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
34
35
36
37
38
39
from
__future__
import
print_function
import
os
import
sys
# 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
def
lambda_handler
(
event
,
context
):
for
arg
in
sys
.
argv
:
print
(
arg
)
print
(
os
.
getcwd
())
print
(
os
.
path
.
basename
(
__file__
))
for
key
in
os
.
environ
.
keys
():
print
(
'{0}={1}'
.
format
(
key
,
os
.
environ
[
key
]))
print
(
os
.
getuid
())
print
(
os
.
getgid
())
print
(
os
.
geteuid
())
print
(
os
.
getegid
())
print
(
os
.
getgroups
())
print
(
os
.
umask
(
0o222
))
print
(
event
)
print
(
context
.
get_remaining_time_in_millis
())
print
(
context
.
aws_request_id
)
if
context
.
client_context
:
print
(
context
.
client_context
)
print
(
context
.
function_name
)
print
(
context
.
function_version
)
print
(
context
.
identity
.
cognito_identity_id
)
print
(
context
.
identity
.
cognito_identity_pool_id
)
print
(
context
.
invoked_function_arn
)
print
(
context
.
log
(
'Log this for me please'
))
print
(
context
.
log_group_name
)
print
(
context
.
log_stream_name
)
print
(
context
.
memory_limit_in_mb
)
return
'It works!'
Back
|
FazBrowse Home
|
New Git URL