FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
lambda-runtime-init/debugging/Makefile at client_context · localstack/lambda-runtime-init · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
localstack
/
lambda-runtime-init
Public
forked from
aws/aws-lambda-runtime-interface-emulator
Notifications
You must be signed in to change notification settings
Fork
3
Star
7
Code
Pull requests
1
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
lambda-runtime-init
/
debugging
/
Makefile
Copy path
More file actions
More file actions
Latest commit
History
History
History
45 lines (33 loc) · 1.32 KB
Breadcrumbs
lambda-runtime-init
/
debugging
/
Makefile
Copy path
File metadata and controls
45 lines (33 loc) · 1.32 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
40
41
42
43
44
45
#
Golang EOL overview: https://endoflife.date/go
DOCKER_GOLANG_IMAGE
?= golang:1.20-bullseye
#
On ARM hosts, use: make ARCH=arm64 build-init
#
Check host architecture: uname -m
#
x86_64 or arm64
ARCH
?= x86_64
ifeq
(
$(
ARCH
)
, arm64)
GOARCH
=arm64
else
GOARCH
=amd64
endif
#
Limitation: Debugging x86_64 lambdas does not work on ARM machines due to missing ptrace implementation in qemu used by Docker
#
The function aborts with "could not launch process: fork/exec /var/rapid/init: function not implemented"
#
* Discussion: https://github.com/aws/aws-sam-cli/discussions/4706
#
* Docker for Mac: https://github.com/docker/for-mac/issues/5191#issuecomment-834154431
all
: build
#
build & "package" necessary files for debugging
build
build-init
: build-rapid build-delve/dlv
cp ../bin/aws-lambda-rie-
$(
ARCH
)
./init/var/rapid/init
cp ./build-delve/dlv ./init/var/rapid/dlv
build-rapid
:
cd
..
&&
GC_FLAGS=
"
all=-N -l
"
make ARCH=
$(
ARCH
)
compile-lambda-linux
build-delve/dlv
:
docker run --rm -v
$$(
pwd
)
/build-delve/:/app/
$(
DOCKER_GOLANG_IMAGE
)
\
bash -c
"
cd /app && export GOARCH=
$(
GOARCH
)
&& ./build.sh
"
clean
clean-init
: clean-rapid clean-delve
clean-rapid
:
rm -rf ../bin/aws-lambda-rie-
*
rm -rf ./init/var/rapid/init
clean-delve
:
rm -rf ./build-delve/dlv
rm -rf ./init/var/rapid/dlv
.PHONY
: build build-rapid clean clean-rapid clean-delve
Back
|
FazBrowse Home
|
New Git URL