Python utilities for AWS Lambda functions including but not limited to tracing, logging and custom metric
Project description
Lambda Powertools
A suite of utilities for AWS Lambda Functions that makes tracing with AWS X-Ray, structured logging and creating custom metrics asynchronously easier.
📜Documentation | API Docs | 🐍PyPi | Feature request | 🐛Bug Report | Kitchen sink example
Features
- Tracing - Decorators and utilities to trace Lambda function handlers, and both synchronous and asynchronous functions
- Logging - Structured logging made easier, and decorator to enrich structured logging with key Lambda context details
- Metrics - Custom Metrics created asynchronously via CloudWatch Embedded Metric Format (EMF)
- Bring your own middleware - Decorator factory to create your own middleware to run logic before, and after each Lambda invocation
Installation
With pip installed, run: pip install aws-lambda-powertools
Example
See example of all features, testing, and a SAM template with all Powertools env vars. All features also provide full docs, and code completion for VSCode and PyCharm.
Credits
- Structured logging initial implementation from aws-lambda-logging
- Powertools idea DAZN Powertools
- Gatsby Apollo Theme for Docs
License
This library is licensed under the MIT-0 License. See the LICENSE file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for aws_lambda_powertools-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47c87461da56907c9e9026acf88ef6b06ef911c8adc27ba325a3deaa9182d97b |
|
MD5 | 0bfed02367a9967dd48288e135a95845 |
|
BLAKE2b-256 | 58f64a6e2429619c860d7efc3ab7940be6a548680e34aa9286e194355ccc8f99 |
Hashes for aws_lambda_powertools-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb86f7e1aa1d024efac7f24600b0bd1e9c2d3796124d684ace5d88276da6155d |
|
MD5 | 93baeaa222019e118ffdc36fe3533922 |
|
BLAKE2b-256 | e4331830a5bb177a7eacf157ad1694b79269909bdbe95ef065972f9f80a4ee40 |