Skip to content

Commit 3bfc95f

Browse files
committed
Update README.md with example for serverless invoke local command
1 parent df77c79 commit 3bfc95f

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,44 @@
11
# bmc-aws-lambda-serverless
2-
The AWS Lambda serverless functions serving the frontend. Setup with AWS API Gateway and AWS DynamoDB.
2+
3+
The AWS Lambda serverless functions serving the frontend. Setup with AWS API
4+
Gateway and AWS DynamoDB.
35

46
The backend for https://github.com/stefanfranzen/business-model-canvas
57

68
## Installation
9+
710
```
811
npm install
912
```
1013

1114
## Deploy
15+
1216
### All lambdas
17+
1318
```
1419
serverless deploy
1520
```
21+
1622
### One specific lambda
23+
1724
```
1825
serverless deploy --function <lambda name>
1926
```
2027

2128
## Testing
29+
2230
### Unit tests
31+
2332
```
2433
npm test
2534
```
35+
2636
### Local lambda with deployed DynamoDB
37+
38+
```
39+
serverless invoke local --function create --path mocks/create-event.json
40+
```
41+
2742
```
2843
{
2944
"body": "{\"content\":\"hello world\",\"attachment\":\"hello.jpg\"}",
@@ -34,7 +49,9 @@ npm test
3449
}
3550
}
3651
```
52+
3753
### The deployed backend in AWS of API Gateway, AWS Lambda's and DynamoDB
54+
3855
```
3956
npx aws-api-gateway-cli-test \
4057
--username='<YOUR_USERS_EMAIL>' \

0 commit comments

Comments
 (0)