Skip to content

Commit dce548f

Browse files
committed
update README
1 parent ddf70c2 commit dce548f

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

README.md

+17-16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Probot & AWS Lambda example
22

3-
This repository is an example of how to deploy the "Hello, World" of probot apps to [AWS Lambda](https://aws.amazon.com/lambda/) using [serverless](https://www.serverless.com/).
3+
This repository is an example of how to deploy the "Hello, World" of probot apps to [AWS Lambda](https://aws.amazon.com/lambda/) using [aws sam](https://aws.amazon.com/serverless/sam/).
44

55
## Local setup
66

@@ -19,26 +19,27 @@ npm start
1919
Follow the instructions to register a new GitHub app.
2020

2121
## Deployment
22-
23-
In order to deploy the app from you local environment, follow the [Serverless user guide for AWS](https://www.serverless.com/framework/docs/providers/aws/guide/quick-start/).
24-
25-
If you use this example as a template, make sure to update [`serverless.yml`](serverless.yml) and set new values for
26-
27-
- `service`
28-
- `app`
29-
- `org`
30-
31-
Make sure to create the following parameters on [https://app.serverless.com](https://app.serverless.com):
32-
22+
Get the following details about your GitHub app:
3323
- `APP_ID`
34-
- `PRIVATE_KEY`
3524
- `WEBHOOK_SECRET`
25+
- `PRIVATE_KEY`
3626

37-
For continuous deployment via GitHub action, copy [this repository's deploy workflow](.github/workflows/deploy.yml) and create the following secrets:
27+
1. Setup your aws cli creds
28+
1. set your aws profile by running `export AWS_PROFILE=<profile>`
29+
1. run `sam build`
30+
1. run `sam deploy --guided`
3831

39-
1. `SERVERLESS_ACCESS_KEY` - You can create a Serverless access key at `https://app.serverless.com/<your org>/settings/accessKeys`
40-
2. `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` - you will likely find your AWS credentials in `~/.aws/credentials`
32+
Subsequent deploys to the same stack to the default environment...
33+
1. run `sam build`
34+
1. run `sam deploy`
4135

36+
## Debugging locally
37+
1. Populate the values in vars.json with the ones specific for your GitHub app. For the `PRIVATE_KEY` replace newlines with `\\n` to make the string value a single line.
38+
1. run `sam build`
39+
1. Run sam local via bash...
40+
```
41+
sam local invoke -d 9999 webhooks -n vars.json -e events/event.json
42+
```
4243
## License
4344

4445
[ISC](LICENSE)

0 commit comments

Comments
 (0)