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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60ed4e0b447f5f6555f8d99ac49a52eead75c5c2b3f07088148910169353f411 |
|
MD5 | 91e5af60bb31d2738be956c895c40549 |
|
BLAKE2b-256 | 3a92e3cfc2dc265a8f23b1900cea736286285e407c95a441b86f7a539b690b6b |
Close
Hashes for aws_lambda_powertools-0.10.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54fe70cbe46422a410ba563ba8926a1fe6d50d02db3e7a72a8e99d339f705e09 |
|
MD5 | 854041e15daec9701284b9c6bf119a43 |
|
BLAKE2b-256 | e65c9cdaa4f7603dcd796779ee866ee5269e4f77030700d992716409a779b8c7 |