# aws-lambda-powertools

> Powertools for AWS Lambda (Python) is a developer toolkit to implement Serverless best practices and increase developer velocity.

- **URL**: https://www.freshcrate.ai/projects/aws-lambda-powertools
- **Author**: Amazon Web Services
- **Category**: Frameworks
- **Latest version**: `v3.29.0` (2026-05-04)
- **License**: MIT
- **Source**: https://github.com/aws-powertools/powertools-lambda-python/issues
- **Homepage**: https://pypi.org/project/aws-lambda-powertools/
- **Language**: Python
- **GitHub**: 3,248 stars, 475 forks
- **Registry**: pypi (`aws-lambda-powertools`)
- **Tags**: `aws`, `aws_lambda_powertools`, `feature_flags`, `idempotency`, `lambda`, `logging`, `powertools`, `pypi`, `tracing`

## Description

<!-- markdownlint-disable MD013 MD041 MD043  -->
# Powertools for AWS Lambda (Python)

[![Build](https://github.com/aws-powertools/powertools-lambda-python/actions/workflows/quality_check.yml/badge.svg)](https://github.com/aws-powertools/powertools-lambda-python/actions/workflows/python_build.yml)
[![codecov.io](https://codecov.io/github/aws-powertools/powertools-lambda-python/branch/develop/graphs/badge.svg)](https://app.codecov.io/gh/aws-powertools/powertools-lambda-python)
![PythonSupport](https://img.shields.io/static/v1?label=python&message=%203.10|%203.11|%203.12|%203.13|%203.14&color=blue?style=flat-square&logo=python) ![PyPI version](https://badge.fury.io/py/aws-lambda-powertools.svg) ![PyPi monthly downloads](https://img.shields.io/pypi/dm/aws-lambda-powertools) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/aws-powertools/powertools-lambda-python/badge)](https://scorecard.dev/viewer/?uri=github.com/aws-powertools/powertools-lambda-python)
[![Discord](https://img.shields.io/badge/Discord-Join_Community-7289da.svg)](https://discord.gg/B8zZKbbyET)

Powertools for AWS Lambda (Python) is a developer toolkit to implement Serverless [best practices and increase developer velocity](https://docs.powertools.aws.dev/lambda/python/latest/#features).

Also available in [Java](https://github.com/aws-powertools/powertools-lambda-java), [TypeScript](https://github.com/aws-powertools/powertools-lambda-typescript), and [.NET](https://github.com/aws-powertools/powertools-lambda-dotnet).

[� Doccumentation](https://docs.powertools.aws.dev/lambda/python/) | [🐍 PyPi](https://pypi.org/project/aws-lambda-powertools/) | [🗺️ Roadmap](https://docs.powertools.aws.dev/lambda/python/latest/roadmap/) | [📰 Blog](https://aws.amazon.com/blogs/opensource/simplifying-serverless-best-practices-with-lambda-powertools/)

![hero-image](https://user-images.githubusercontent.com/3340292/198254617-d0fdb672-86a6-4988-8a40-adf437135e0a.png)

## Features

Core utilities such as Tracing, Logging, Metrics, and Event Handler are available across all Powertools for AWS Lambda languages. Additional utilities are subjective to each language ecosystem and customer demand.

* **[Tracing](https://docs.powertools.aws.dev/lambda/python/latest/core/tracer/)** - Decorators and utilities to trace Lambda function handlers, and both synchronous and asynchronous functions
* **[Logging](https://docs.powertools.aws.dev/lambda/python/latest/core/logger/)** - Structured logging made easier, and target to enrich structured logging with key Lambda context details
* **[Metrics](https://docs.powertools.aws.dev/lambda/python/latest/core/metrics/)** - Custom Metrics created asynchronously via CloudWatch Embedded Metric Format (EMF)
* **[Event handler: AppSync](https://docs.powertools.aws.dev/lambda/python/latest/core/event_handler/appsync/)** - AppSync event handler for Lambda Direct Resolver and Amplify GraphQL Transformer function
* **[Event handler: AppSync Events](https://docs.powertools.aws.dev/lambda/python/latest/core/event_handler/appsync_events/)** - AppSync Events handler for real-time WebSocket APIs with pub/sub pattern
* **[Event handler: API Gateway, ALB, Lambda Function URL, VPC Lattice](https://docs.powertools.aws.dev/lambda/python/latest/core/event_handler/api_gateway/)** - REST/HTTP API event handler for Lambda functions invoked via Amazon API Gateway, ALB, Lambda Function URL, and VPC Lattice
* **[Event handler: Agents for Amazon Bedrock](https://docs.powertools.aws.dev/lambda/python/latest/core/event_handler/bedrock_agents/)** - Create Agents for Amazon Bedrock, automatically generating OpenAPI schemas
* **[Middleware factory](https://docs.powertools.aws.dev/lambda/python/latest/utilities/middleware_factory/)** - Decorator factory to create your own middleware to run logic before, and after each Lambda invocation
* **[Parameters](https://docs.powertools.aws.dev/lambda/python/latest/utilities/parameters/)** - Retrieve and cache parameter values from Parameter Store, Secrets Manager, AppConfig, or DynamoDB
* **[Batch processing](https://docs.powertools.aws.dev/lambda/python/latest/utilities/batch/)** - Handle partial failures for AWS SQS, Kinesis Data Streams, and DynamoDB Streams batch processing
* **[Typing](https://docs.powertools.aws.dev/lambda/python/latest/utilities/typing/)** - Static typing classes to speedup development in your IDE
* **[Validation](https://docs.powertools.aws.dev/lambda/python/latest/utilities/validation/)** - JSON Schema validator for inbound events and responses
* **[Event source data classes](https://docs.powertools.aws.dev/lambda/python/latest/utilities/data_classes/)** - Data classes describing the schema of common Lambda event triggers
* **[Parser](https://docs.powertools.aws.dev/lambda/python/latest/utilities/parser/)** - Data parsing and deep validation using Pydantic
* **[Idempotency](https://docs.powertools.aws.dev/lambda/python/latest/utilities/idempotency/)** - Convert your Lambda f

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `v3.29.0` | 2026-05-04 | High | ## Summary  We're thrilled to announce native async resolution for the Event Handler. Write `async def` route handlers, call `await app.resolve_async(event, context)`, and mix sync/async middlewares. Everything runs natively on the event loop.  We also fixed OpenAPI schema generation for Pydantic `@computed_field`, a deadlock when sync middlewares raised before calling `next()`, and ALB returning 422 when response body is `None`.  A huge thanks to @hirenkumar-n-dholariya, @amrabed, and @ca |
| `3.28.0` | 2026-04-21 | Low | Imported from PyPI (3.28.0) |
| `v3.28.0` | 2026-04-15 | High | ## Summary  This release brings dependency injection, an enriched Request object, OpenAPI improvements, and internal refactoring to the Event Handler.  - **Dependency injection**: type-safe `Depends()` with nested resolution, caching, and test overrides - **Enriched Request**: `resolved_event` and `context` properties bridge middleware and dependencies - **OpenAPI status_code**: set default response status code on route decorators - **Query string fix**: parameters no longer dropped when |
| `v3.28.0` | 2026-04-15 | Medium | ## Summary  This release brings dependency injection, an enriched Request object, OpenAPI improvements, and internal refactoring to the Event Handler.  - **Dependency injection**: type-safe `Depends()` with nested resolution, caching, and test overrides - **Enriched Request**: `resolved_event` and `context` properties bridge middleware and dependencies - **OpenAPI status_code**: set default response status code on route decorators - **Query string fix**: parameters no longer dropped when |
| `v3.28.0` | 2026-04-15 | Medium | ## Summary  This release brings dependency injection, an enriched Request object, OpenAPI improvements, and internal refactoring to the Event Handler.  - **Dependency injection**: type-safe `Depends()` with nested resolution, caching, and test overrides - **Enriched Request**: `resolved_event` and `context` properties bridge middleware and dependencies - **OpenAPI status_code**: set default response status code on route decorators - **Query string fix**: parameters no longer dropped when |
| `v3.28.0` | 2026-04-15 | Medium | ## Summary  This release brings dependency injection, an enriched Request object, OpenAPI improvements, and internal refactoring to the Event Handler.  - **Dependency injection**: type-safe `Depends()` with nested resolution, caching, and test overrides - **Enriched Request**: `resolved_event` and `context` properties bridge middleware and dependencies - **OpenAPI status_code**: set default response status code on route decorators - **Query string fix**: parameters no longer dropped when |
| `v3.28.0` | 2026-04-15 | Medium | ## Summary  This release brings dependency injection, an enriched Request object, OpenAPI improvements, and internal refactoring to the Event Handler.  - **Dependency injection**: type-safe `Depends()` with nested resolution, caching, and test overrides - **Enriched Request**: `resolved_event` and `context` properties bridge middleware and dependencies - **OpenAPI status_code**: set default response status code on route decorators - **Query string fix**: parameters no longer dropped when |
| `v3.28.0` | 2026-04-15 | Medium | ## Summary  This release brings dependency injection, an enriched Request object, OpenAPI improvements, and internal refactoring to the Event Handler.  - **Dependency injection**: type-safe `Depends()` with nested resolution, caching, and test overrides - **Enriched Request**: `resolved_event` and `context` properties bridge middleware and dependencies - **OpenAPI status_code**: set default response status code on route decorators - **Query string fix**: parameters no longer dropped when |
| `v3.28.0` | 2026-04-15 | Medium | ## Summary  This release brings dependency injection, an enriched Request object, OpenAPI improvements, and internal refactoring to the Event Handler.  - **Dependency injection**: type-safe `Depends()` with nested resolution, caching, and test overrides - **Enriched Request**: `resolved_event` and `context` properties bridge middleware and dependencies - **OpenAPI status_code**: set default response status code on route decorators - **Query string fix**: parameters no longer dropped when |
| `v3.28.0` | 2026-04-15 | Medium | ## Summary  This release brings dependency injection, an enriched Request object, OpenAPI improvements, and internal refactoring to the Event Handler.  - **Dependency injection**: type-safe `Depends()` with nested resolution, caching, and test overrides - **Enriched Request**: `resolved_event` and `context` properties bridge middleware and dependencies - **OpenAPI status_code**: set default response status code on route decorators - **Query string fix**: parameters no longer dropped when |

## Dependency audit

- **Score**: 100/100
- **Total deps**: 1
- **Resolved**: 1
- **Unresolved**: 0
- **License conflicts**: 0
- **Warnings**: 0
- **Scanned**: 2026-05-25

## Citation

- HTML: https://www.freshcrate.ai/projects/aws-lambda-powertools
- Markdown: https://www.freshcrate.ai/projects/aws-lambda-powertools.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/aws-lambda-powertools/deps

_Generated by freshcrate.ai. Indexes pypi releases for AI-agent ecosystem packages._
