Firetail Lambda Package
Project description
Firetail Python Lambda Middleware
###Overview
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
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.
###Supported Lambda Runtimes
- Python 3.7
- Python 3.8
- Python 3.9
###Installation Install the module with using pip
pip install -U firetail-lambda
Implementing Middleware in lambda function
from firetail_lambda import firetail_handler
@firetail_handler()
def lambda_handler(event, context):
return {
"statusCode": 200,
"body": json.dumps({
"message": "Hello"
})
}
Multiple Event handlers
from firetail_lambda import firetail_handler
@firetail_handler()
def lambda_handler(event, context):
return {
"statusCode": 200,
"body": json.dumps({
"message": "Hello"
})
}
@firetail_handler()
def lambda_handler_2(event, context):
return {
"statusCode": 200,
"body": json.dumps({
"message": "Hello 2"
})
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Firetail-Lambda-0.1.4.tar.gz
(6.3 kB
view hashes)
Built Distribution
Close
Hashes for Firetail_Lambda-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d72432ad9863302d207c9341f68aaf74226ab77722146bd08aa32ca991d3a079 |
|
MD5 | d80f16f87b04c24452ce917ce2e55819 |
|
BLAKE2b-256 | bbc501589dd4c3915bd13c481fabe39a7e028a6440bedfcede8f5e42cff3be7e |