louis70109 / aws-sentry-flask-example

It combine Sentry on Flask, which is deploy in AWS by serverless framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

aws-sentry-flask-example

Welcome here!

This is base on aws-line-echo-bot's version, using serverless to build a line echo bot and import sentry to catch error by flask in AWS.

Topic link: url

Bebore you start

  1. Line developer account
  2. Line Message API
  3. Sentry account

Quick Start

  1. Install serverless via npm
$ npm install -g serverless
  1. Setup your AWS ceritficate
export AWS_ACCESS_KEY_ID=<your-key-here>
export AWS_SECRET_ACCESS_KEY=<your-secret-key-here>
  1. Clone this project
$ serverless install --url https://github.com/louis70109/aws-line-wsgi-python -n <YOUR_FILE_NAME>
$ cd <YOUR_FILE_NAME>/
  1. Rename .env.sample to .env and insert key in file.
SENTRY_DSN=
LINE_CHANNEL_TOKEN=
LINE_CHANNEL_SECRET_KEY=
  1. Deploy the webhhok function
npm install
pip install -r requirements.txt
serverless deploy
  1. You may have like this domain

  1. Copy and Paste domain in your LINE bot account

  1. Now you can test you chatbot, have fun! Echo bot

  2. If have logging waring, error, Internal(500) or Traceback it will send you Sentry account.

Author

Create by NiJia

License

The project is available as open source under the terms of the MIT License.

About

It combine Sentry on Flask, which is deploy in AWS by serverless framework

License:MIT License


Languages

Language:Python 100.0%