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
executable file
·
38 lines (25 loc) · 889 Bytes

File metadata and controls

executable file
·
38 lines (25 loc) · 889 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
35
36
37
#!/bin/sh
set -euo pipefail
export HOME=/tmp
export PATH=/tmp/.local/bin:$PATH
cd /tmp
curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py --user
pip install --user awscli
while true
do
HEADERS="$(mktemp)"
EVENT_DATA=$(curl -v -sS -LD "$HEADERS" -X GET "http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/invocation/next")
INVOCATION_ID=$(grep -Fi Lambda-Runtime-Aws-Request-Id "$HEADERS" | tr -d '[:space:]' | cut -d: -f2)
tar -cpzf /tmp/provided.tgz --numeric-owner --ignore-failed-read /var/runtime /var/lang
echo 'Zipping done! Uploading...'
aws s3 cp /tmp/provided.tgz s3://lambci/fs/ --acl public-read
echo 'Uploading done!'
RESPONSE="
$(env)
$(ps aux)
$(xargs -n 1 -0 < /proc/1/environ)
"
echo $RESPONSE
curl -v "http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/invocation/$INVOCATION_ID/response" -d "$RESPONSE"
done
Morty Proxy This is a proxified and sanitized view of the page, visit original site.