Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sawyerh committed Aug 6, 2023
1 parent 8321505 commit 9aa978f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions aws/email-importer/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
env.json
.aws-sam
.serverless
.esbuild
5 changes: 4 additions & 1 deletion aws/email-importer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ logs: # AWS Lambda logs for the function
npx serverless logs --function importer --tail --stage production

invoke-with-test-event: # Invoke the function with a test event
npx serverless invoke --function importer --stage production --path fixtures/test-event.json --log
npx serverless invoke --function importer --stage production --path fixtures/test-event.json --log

invoke-local: # Invoke the function with a test event
npx serverless invoke local --function importer --stage production --path fixtures/test-event.json
5 changes: 4 additions & 1 deletion aws/email-importer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ sequenceDiagram

## 🧰 Local development

The easiest way to run the Lambda function locally is likely through the test suite. The Serverless CLI can also be used to [invoke the function directly](https://www.serverless.com/framework/docs/providers/aws/cli-reference/invoke-local).
There's a few ways to test this locally:

1. Through the test suite. See below. This runs against a local Firebase emulator.
2. Run `make invoke-local` to use the Serverless CLI to [invoke the function directly](https://www.serverless.com/framework/docs/providers/aws/cli-reference/invoke-local). By default, this uses a test event with a `test: true` property, in order to not make requests to the database.

## 🧪 Testing

Expand Down

1 comment on commit 9aa978f

@vercel
Copy link

@vercel vercel bot commented on 9aa978f Aug 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.