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.9.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1140245e86d9afcaf50e7332aec43302b0685b64461dbd190da3560e9181dfb3 |
|
MD5 | f6855e30a99c5ca793bb2cbee93d73dc |
|
BLAKE2b-256 | bee3ff85c035be26d266a4c353fb3f7d653f04b94e5cf23913e93f530125c7d6 |
Hashes for aws_lambda_powertools-2.9.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d3c810898919ffb195d7f3b159d04838b8b0bb2fc66a12d88698f9f2c0325ac |
|
MD5 | 6bdc704ddec3ef88a66a520690a385d5 |
|
BLAKE2b-256 | 502e6966d80af1f30d073611688ff470e805c2348146679464b3dce7a694e307 |