Created
July 7, 2020 13:21
-
-
Save matthewp/8cae638bb84eb8f17c87c38856d9a17a to your computer and use it in GitHub Desktop.
Lambda makefile
This file contains 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
aws lambda create-function \ | |
--function-name my-function-name \ | |
--runtime nodejs12.x \ | |
--role arn:aws:iam::..... \ | |
--handler main.handle \ | |
--zip-file fileb://./main.zip |
This file contains 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
main.zip: main.js package.json package-lock.json src lib node_modules | |
zip -r $@ $^ | |
clean: | |
@rm -f main.zip deploy.json | |
.PHONY: clean | |
deploy.json: main.zip | |
aws lambda update-function-code --function-name my-function-name --zip-file fileb://./$^ > $@ | |
deploy: deploy.json | |
.PHONY: deploy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment