AWS Lambda Powertools is a developer toolkit to implement Serverless best practices and increase developer velocity.
Project description
AWS Lambda Powertools for Python
Powertools is a developer toolkit to implement Serverless best practices and increase developer velocity.
Also available in Java, Typescript, and .NET.
📜Documentation | 🐍PyPi | Roadmap | Detailed blog post
An AWS Developer Acceleration (DevAx) initiative by Specialist Solution Architects | aws-devax-open-source@amazon.com
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)
- Event handler: AppSync - AWS AppSync event handler for Lambda Direct Resolver and Amplify GraphQL Transformer function
- Event handler: API Gateway and ALB - Amazon API Gateway REST/HTTP API and ALB event handler for Lambda functions invoked using Proxy integration
- 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
- Idempotency - Convert your Lambda functions into idempotent operations which are safe to retry
- Feature Flags - A simple rule engine to evaluate when one or multiple features should be enabled depending on the input
- Streaming - Streams datasets larger than the available memory as streaming data.
Installation
With pip installed, run: pip install aws-lambda-powertools
Tutorial and Examples
- Tutorial
- Serverless Shopping cart
- Serverless Airline
- Serverless E-commerce platform
- Serverless GraphQL Nanny Booking Api
Credits
- Structured logging initial implementation from aws-lambda-logging
- Powertools idea DAZN Powertools
Connect
- AWS Lambda Powertools on Discord:
#python
- Invite link - Email: aws-lambda-powertools-feedback@amazon.com
Security disclosures
If you think you’ve found a potential security issue, please do not post it in the Issues. Instead, please follow the instructions here or email AWS security directly.
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-2.12.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e77e37fb0f6763ad8f397e0edd49e9657fd9f381475e877b2b0ca78667c53b98 |
|
MD5 | ca35e5a302da29e4f95fa169ded7fb10 |
|
BLAKE2b-256 | 4e6d2bd5f985957e36a5688f4169657bcd0a43c8c0e0b5839679bd1b3bbc2ca9 |
Hashes for aws_lambda_powertools-2.12.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38bc650bf082f5877efdb49cf8bcd419c2538d57a3bad2a51c7c9bdb6011340f |
|
MD5 | 20479bac47e849686fe529a0d2422bd7 |
|
BLAKE2b-256 | 032b5de278026358ab8e3fdd85b6b41f5b39ba17a9c159e2c02a35d3eb8c1770 |