Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include json file for overriding parameters in local testing #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 7 additions & 0 deletions local-env-example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"Parameters": {
"CAPTURE_URL": "",
"S3_BUCKET_NAME": "",
"S3_PATH": ""
}
}