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.
- Status: Release candidate
- How long until GA?: Current progress
- Docs: Main docs | API Docs
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
Close
Hashes for aws_lambda_powertools-0.9.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 977787abfe9104e69b84d27fe2082d54fe7fbfab921769842b9c6d7d5b849f24 |
|
MD5 | 1b69fd750db16286bbba5e6445e4bd88 |
|
BLAKE2b-256 | c8d8346a7307f53b97fd312e0702c270106b73ff248ebc11f04e17d78b646ebe |
Close
Hashes for aws_lambda_powertools-0.9.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4eb657051a16c1dad0996f00ab3e7133dad83d3289773b676dd294b513e129af |
|
MD5 | 5528c296ff31019b7eaacaae26b0668e |
|
BLAKE2b-256 | b0959debd3f462bce0481c580322a20673c5e31802861c68809c673cf69e474a |