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.11.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 214604b8ee56bd25c6431540fbdc3ad651504b36dca9ae731f750f9284802f40 |
|
MD5 | c85a30a9387ac2f00a34b0002adb2882 |
|
BLAKE2b-256 | 045a8370f81dad2a45e23b5d6c22e54772a2b6a80f95d7153bd5b2fbd1ec0d82 |
Close
Hashes for aws_lambda_powertools-0.11.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89bdb2bc85f0bcf6eae5bda5804ba0b9000bd5a239747d0054730570f0d8ed5c |
|
MD5 | 6d04a60a5b0c6af5c3282aae0a0ea2e7 |
|
BLAKE2b-256 | dc1cb96cf6cd3a54f5cc4f768bd9ea3a320e304e8937e9169f29a959751729b2 |