From 2f875253595f596a782cf7a8570dd4323bb406df Mon Sep 17 00:00:00 2001 From: Alex Caloggero Date: Tue, 30 Jan 2024 10:55:04 -0500 Subject: [PATCH] Include json file for overriding parameters in local testing --- README.md | 2 ++ local-env-example.json | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 local-env-example.json diff --git a/README.md b/README.md index 258ba1f..0f190f0 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,8 @@ To simulate the Eventbridge schedule trigger, run: npm run local:schedule ``` +Local testing by default looks for parameters inside `template.yml` so when simulating the lambda locally, the default parameters need to be overriden by using `--env-vars local-env-example.json` in the `sam local invoke` command found in `package.json`. Update `local-env-example.json` with your own parameters. + ## How to remove The Lambda and all of it's associated resources can be removed by deleting the CloudFormation stack. The existing S3 bucket specified for the static assets will not be affected. diff --git a/local-env-example.json b/local-env-example.json new file mode 100644 index 0000000..befeb4d --- /dev/null +++ b/local-env-example.json @@ -0,0 +1,7 @@ +{ + "Parameters": { + "CAPTURE_URL": "", + "S3_BUCKET_NAME": "", + "S3_PATH": "" + } +} \ No newline at end of file