Skip to content

Commit 321ae0b

Browse files
committed
cleanup + makefile target for hot reloading
1 parent bf53c39 commit 321ae0b

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@ load-state: ## Load the application state from a local file
1919
clean: ## Clean up any temporary files
2020
rm *.zip
2121

22+
hot-reload:
23+
awslocal lambda update-function-code --function-name ScoringFunction --s3-bucket hot-reload --s3-key "$(pwd)/lambdas/scoring"
24+
2225
.PHONY: usage deploy web save-state load-state clean

bin/deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ for LAMBDA_INFO in "${LAMBDAS[@]}"; do
145145
log "Creating Lambda function $FUNCTION_NAME..."
146146
awslocal lambda create-function \
147147
--function-name ${FUNCTION_NAME} \
148-
--runtime python3.8 \
148+
--runtime python3.10 \
149149
--handler handler.lambda_handler \
150150
--zip-file fileb://${ZIP_FILE} \
151151
--role arn:aws:iam::000000000000:role/${ROLE_NAME} \

lambdas/scoring/handler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from decimal import Decimal, getcontext
44

55
def lambda_handler(event, context):
6+
# raise Exception()
67
getcontext().prec = 6
78

89
dynamodb = boto3.resource('dynamodb')

run.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)