Python utilities for AWS Lambda functions including but not limited to tracing, logging and custom metric
Project description
AWS Lambda Powertools (Python)
A suite of Python utilities for AWS Lambda functions to ease adopting best practices such as tracing, structured logging, custom metrics, and more. (AWS Lambda Powertools Java is also available).
📜Documentation | API Docs | 🐍PyPi | Feature request | 🐛Bug Report | Hello world example | Detailed blog post
Join us on the AWS Developers Slack at
#lambda-powertools
- Invite, if you don't have an account
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
- Parameters utility - Retrieve and cache parameter values from Parameter Store, Secrets Manager, or DynamoDB
- Batch processing - Handle partial failures for AWS SQS batch processing
- Typing - Static typing classes to speedup development in your IDE
- Validation - JSON Schema validator for inbound events and responses
- Event source data classes - Data classes describing the schema of common Lambda event triggers
- Parser - Data parsing and deep validation using Pydantic
Installation
With pip installed, run: pip install aws-lambda-powertools
Examples
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.10.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ae9d38ccbf46ff0a4230c265d4fec0e4910062b52c3881812d36d717bc2ace3 |
|
MD5 | 18f70db7b053a7d506ec9658a0c97b3a |
|
BLAKE2b-256 | 17bad2d5cc53bd282f72efd0f350cbf98426d595f895d109f3629857efd45507 |
Hashes for aws_lambda_powertools-1.10.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2db028d52c197f98ce6a11081749ceefbffa31c69cb8725de3d84beb32d206b5 |
|
MD5 | cb1549136920f7117a45567ac86954d1 |
|
BLAKE2b-256 | 87513febb4d8be01e637420f7ebdf31c1ea4e5e302ed6e4e11c075b6ffbb66e1 |