diff --git a/.gitignore b/.gitignore index 1115d69..329f765 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,8 @@ __pycache__ # LocalStack volume/ -.idea +.idea/ +.vscode/ cdk.context.json +app-state.zip* diff --git a/Makefile b/Makefile index 91981d0..a8ecd5a 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,12 @@ load-state: ## Load the application state from a local file clean: ## Clean up any temporary files rm *.zip -hot-reload: +hot-reload: ## Reconfigure the Lambda function to enable hot reloading awslocal lambda update-function-code --function-name ScoringFunction --s3-bucket hot-reload --s3-key "$$(pwd)/lambdas/scoring" +start-debug: ## Start LocalStack with Lambda debug mode enabled + DEBUG=1 LOCALSTACK_LAMBDA_DEBUG_MODE=1 \ + LOCALSTACK_LAMBDA_DEBUG_MODE_CONFIG_PATH=/tmp/debug_config.yml \ + localstack start --volume $$(pwd)/etc/debug-config.yml:/tmp/debug_config.yml + .PHONY: usage deploy web save-state load-state clean diff --git a/etc/debug-config.yml b/etc/debug-config.yml new file mode 100644 index 0000000..570f78f --- /dev/null +++ b/etc/debug-config.yml @@ -0,0 +1,3 @@ +functions: + arn:aws:lambda:us-east-1:000000000000:function:ListPublicQuizzesFunction: + debug-port: 19891