Skip to content

Commit 8748fdd

Browse files
author
Riley Priddle
committed
updated readme
1 parent 4d3c4d1 commit 8748fdd

File tree

1 file changed

+33
-8
lines changed

1 file changed

+33
-8
lines changed

README.md

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,21 @@
22

33
[![PyPI package](https://img.shields.io/badge/pip%20install-firetail--lambda-brightgreen)](https://pypi.org/project/firetail-lambda/) [![version number](https://img.shields.io/pypi/v/firetail-lambda?color=green&label=version)](https://github.com/Firetail-io/firetail-py-lambda/releases) [![Actions Status](https://github.com/Firetail-io/firetail-py-lambda/workflows/Test/badge.svg)](https://github.com/Firetail-io/firetail-py-lambda/actions) [![License: LGPL v3](https://img.shields.io/badge/License-LGPL_v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) [![codecov](https://codecov.io/gh/FireTail-io/firetail-py-lambda/branch/main/graph/badge.svg?token=HU206RRZZ4)](https://codecov.io/gh/FireTail-io/firetail-py-lambda)
44

5-
The purpose of this module is to correctly log out the event and response payload to allow the firetail extension to then send it on to the firetail logging api
5+
###Overview
66

7-
```bash
8-
pip install firetail-lambda
9-
```
7+
The purpose of this module is to correctly log out the AWS Lambda event and response payload to allow the firetail extension to then send it on to the firetail logging api
8+
9+
The firetail_handler is a decorator that wraps around an event handler function in a AWS Lambda to extract the event and response payloads into a base64 logging message.
1010

11-
How to implement
11+
###Supported Lambda Runtimes
12+
- [x] Python 3.7
13+
- [x] Python 3.8
14+
- [x] Python 3.9
1215

13-
Add Environment variables to code/lambda
16+
###Installation
17+
Install the module with using pip
1418
```bash
15-
export FIRETAIL_API_URL=https://api.logging.eu-west-1.sandbox.firetail.app/logs/bulk
16-
export FIRETAIL_API_TOKEN=<your-api-token>
19+
pip install -U firetail-lambda
1720
```
1821

1922

@@ -31,4 +34,26 @@ def lambda_handler(event, context):
3134
})
3235
}
3336
```
37+
Multiple Event handlers
38+
```python
39+
from firetail_lambda import firetail_handler
40+
41+
@firetail_handler()
42+
def lambda_handler(event, context):
43+
return {
44+
"statusCode": 200,
45+
"body": json.dumps({
46+
"message": "Hello"
47+
})
48+
}
49+
50+
@firetail_handler()
51+
def lambda_handler_2(event, context):
52+
return {
53+
"statusCode": 200,
54+
"body": json.dumps({
55+
"message": "Hello 2"
56+
})
57+
}
58+
```
3459

0 commit comments

Comments
 (0)