File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -48,8 +48,9 @@ Preparing a binary to deploy to AWS Lambda requires that it is compiled for Linu
4848## For developers on Linux and macOS
4949``` shell
5050# Remember to build your handler executable for Linux!
51- GOOS=linux GOARCH=amd64 go build -o main main.go
52- zip main.zip main
51+ # When using the `provided.al2` runtime, the handler executable should be named `bootstrap`
52+ GOOS=linux GOARCH=amd64 go build -o bootstrap main.go
53+ zip lambda-handler.zip bootstrap
5354```
5455
5556## For developers on Windows
@@ -68,17 +69,17 @@ in cmd.exe:
6869set GOOS=linux
6970set GOARCH=amd64
7071set CGO_ENABLED=0
71- go build -o main main.go
72- %USERPROFILE%\Go\bin\build-lambda-zip.exe -o main .zip main
72+ go build -o bootstrap main.go
73+ %USERPROFILE%\Go\bin\build-lambda-zip.exe -o lambda-handler .zip bootstrap
7374```
7475
7576in Powershell:
7677``` posh
7778$env:GOOS = "linux"
7879$env:GOARCH = "amd64"
7980$env:CGO_ENABLED = "0"
80- go build -o main main.go
81- ~\Go\Bin\build-lambda-zip.exe -o main .zip main
81+ go build -o bootstrap main.go
82+ ~\Go\Bin\build-lambda-zip.exe -o lambda-handler .zip bootstrap
8283```
8384# Deploying your functions
8485
You can’t perform that action at this time.
0 commit comments