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.10.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6526182421f33feca1bf823b803dbe0c6362bf97103cea75c29602e04820020d |
|
MD5 | 3d33000bd5861532416c7ad641a91f51 |
|
BLAKE2b-256 | 95a212f565eaf64d292575c09a0e89483b1a1b7303a1f0a9c5b683fd7ff9c10d |
Close
Hashes for aws_lambda_powertools-0.10.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f954ec407bbfc512790e589d78eb7dd5c53ed80beab28d9913f36ce623696cf8 |
|
MD5 | 0ac03d679c08df385d90a5462b804612 |
|
BLAKE2b-256 | 9513d80e3e64ec7eb82255bd183da70d6795c376738ff0ee5bb91078e0bd0773 |