File tree 1 file changed +7
-6
lines changed
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
48
48
## For developers on Linux and macOS
49
49
``` shell
50
50
# 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
53
54
```
54
55
55
56
## For developers on Windows
@@ -68,17 +69,17 @@ in cmd.exe:
68
69
set GOOS=linux
69
70
set GOARCH=amd64
70
71
set 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
73
74
```
74
75
75
76
in Powershell:
76
77
``` posh
77
78
$env:GOOS = "linux"
78
79
$env:GOARCH = "amd64"
79
80
$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
82
83
```
83
84
# Deploying your functions
84
85
You can’t perform that action at this time.
0 commit comments