Last active
May 22, 2025 12:38
-
-
Save ldipotetjob/e9e31ff11dd5bea791b50014ba1cb77d to your computer and use it in GitHub Desktop.
Revisions
-
ldipotetjob revised this gist
May 22, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -19,7 +19,7 @@ help: build: mkdir -p deployment-package cp -r src/$(HANDLER)/. src/standard_utils.py deployment-package/ if [ -f requirements.txt ]; then pip install -r requirements.txt --target deployment-package/; fi cd deployment-package && zip -r9 ../$(ZIP_FILE) . -
ldipotetjob revised this gist
May 22, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ ROLE_ARN=$(ROLE) ZIP_FILE=deployment-package.zip REGION=eu-west-1 # run under this project structure: https://github.com/ldipotetjob/AWS/blob/main/serverless/lambda/project/structure.md # keep in mind your security tokens export in your terminal: # export AWS_ACCESS_KEY_ID=${token_access_key} -
ldipotetjob revised this gist
May 22, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ REGION=eu-west-1 # export AWS_SECRET_ACCESS_KEY=${token_secret_key} # @see: https://makefiletutorial.com/ # example of use: make all HANDLER=my_lambda_function ROLE=execution_role_of_the_lambda_function FUNCTION_NAME=$(HANDLER) all: help build deploy clean -
ldipotetjob revised this gist
May 22, 2025 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,8 @@ ROLE_ARN=$(ROLE) ZIP_FILE=deployment-package.zip REGION=eu-west-1 # run under this project structure: https://raw.githubusercontent.com/ldipotetjob/AWS/refs/heads/main/serverless/lambda/project/structure.md # keep in mind your security tokens export in your terminal: # export AWS_ACCESS_KEY_ID=${token_access_key} # export AWS_SECRET_ACCESS_KEY=${token_secret_key} -
ldipotetjob created this gist
May 22, 2025 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ ROLE_ARN=$(ROLE) ZIP_FILE=deployment-package.zip REGION=eu-west-1 # keep in mind your security tokens export in your terminal: # export AWS_ACCESS_KEY_ID=${token_access_key} # export AWS_SECRET_ACCESS_KEY=${token_secret_key} # @see: https://makefiletutorial.com/ # example of use: make all HANDLER=test_make ROLE=execution_role_of_the_lambda_function FUNCTION_NAME=$(HANDLER) all: help build deploy clean help: echo "deploying " $(HANDLER) build: mkdir -p deployment-package cp src/$(HANDLER)/lambda_function.py src/standard_utils.py deployment-package/ if [ -f requirements.txt ]; then pip install -r requirements.txt --target deployment-package/; fi cd deployment-package && zip -r9 ../$(ZIP_FILE) . deploy: echo "Deploying lambda function:" $(HANDLER) aws lambda update-function-code --function-name $(FUNCTION_NAME) --zip-file fileb://$(ZIP_FILE) --region $(REGION) clean: rm -rf deployment-package $(ZIP_FILE)