Skip to content

Instantly share code, notes, and snippets.

@danielwhite
Created June 26, 2019 02:29
Show Gist options
  • Save danielwhite/3a8ddd9b3a2f55144d06a37d1aab04d6 to your computer and use it in GitHub Desktop.
Save danielwhite/3a8ddd9b3a2f55144d06a37d1aab04d6 to your computer and use it in GitHub Desktop.
Makefile for AWS Lambda (Go)
PACKAGE ?= lambda.zip
HANDLER ?= main
all: $(PACKAGE)
.PHONY: clean
clean:
rm -f $(PACKAGE)
$(PACKAGE): $(HANDLER)
zip -m $@ $^
# Force go to decide if this is new.
$(HANDLER):
GOOS=linux go build -o $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment