Skip to content

Commit 47a371f

Browse files
committed
add configs for Lambda debugging
1 parent 260e2e5 commit 47a371f

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ __pycache__
2121
# LocalStack
2222

2323
volume/
24-
.idea
24+
.idea/
25+
.vscode/
2526

2627
cdk.context.json
28+
app-state.zip*

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ load-state: ## Load the application state from a local file
2222
clean: ## Clean up any temporary files
2323
rm *.zip
2424

25-
hot-reload:
25+
hot-reload: ## Reconfigure the Lambda function to enable hot reloading
2626
awslocal lambda update-function-code --function-name ScoringFunction --s3-bucket hot-reload --s3-key "$$(pwd)/lambdas/scoring"
2727

28+
start-debug: ## Start LocalStack with Lambda debug mode enabled
29+
DEBUG=1 LOCALSTACK_LAMBDA_DEBUG_MODE=1 \
30+
LOCALSTACK_LAMBDA_DEBUG_MODE_CONFIG_PATH=/tmp/debug_config.yml \
31+
localstack start --volume $$(pwd)/etc/debug-config.yml:/tmp/debug_config.yml
32+
2833
.PHONY: usage deploy web save-state load-state clean

etc/debug-config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
functions:
2+
arn:aws:lambda:us-east-1:000000000000:function:ListPublicQuizzesFunction:
3+
debug-port: 19891

0 commit comments

Comments
 (0)