Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
34 lines (30 loc) · 965 Bytes

File metadata and controls

34 lines (30 loc) · 965 Bytes
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
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__),
"ps aux": str(subprocess.check_output(['ps', 'aux'])),
"event": event
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.