Created
September 27, 2025 05:34
-
-
Save kenjij/f638e553462573d03e21e822d09b597f to your computer and use it in GitHub Desktop.
Preparing Go (golang) executable as AWS Lambda function using zip file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # 1. Create AWS Lambda function: | |
| # Runtime - Amazon Linux 2023 | |
| # Architecture - arm64 | |
| # 2. Build the Go executable packaged into a zip file | |
| # 3. Upload the zip file | |
| # | |
| all: build package | |
| build: | |
| GOOS=linux GOARCH=arm64 go build -o bootstrap main.go | |
| package: | |
| zip lambda-handler bootstrap | |
| zipinfo -t lambda-handler | |
| clean: | |
| rm -fv bootstrap | |
| rm -fv lambda-handler.zip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment