# Powertools for AWS Lambda

A developer toolkit to implement Serverless best practices and increase developer velocity.

Repository: https://github.com/aws-powertools/powertools-lambda-python
Canonical: https://ross.abutalabs.com/products/powertools-for-aws-lambda
Homepage: https://docs.powertools.aws.dev/lambda/python/latest/
Language: Python
License: MIT-0
License Family: permissive
Topics: aws, aws-lambda, lambda, python, serverless
Last push: 2026-08-24T20:33:58+00:00
Link (homepage): https://docs.powertools.aws.dev/lambda/python/latest/
Link (site_page): https://docs.aws.amazon.com/powertools/python/latest/lambda-features/durable-functions
Link (site_page): https://docs.aws.amazon.com/powertools/python/latest/api_doc/batch/base
Link (site_page): https://docs.aws.amazon.com/powertools/python/latest/getting-started/install
Link (site_page): https://docs.aws.amazon.com/powertools/python/latest/changelog

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 97, longevity 100
- inputs: {"age_days": 2483, "days_push": 9, "days_rel": 23, "gap_med": 14.0, "n_releases_24m": 37}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3280, forks 490 (observed 2026-08-28T04:07:53.566346+00:00)

## What it is
Powertools for AWS Lambda is a developer toolkit (available for Python, TypeScript, Java, and .NET) that implements serverless best practices as ready-made utilities for AWS Lambda functions. It provides core utilities like structured logging, distributed tracing, custom metrics via CloudWatch EMF, plus utilities for idempotency, batch processing, feature flags, data validation, and event handlers for API Gateway, AppSync, and other event sources.

## Use cases
- add structured JSON logging to lambda functions
- trace lambda handlers with AWS X-Ray
- emit custom CloudWatch metrics from serverless apps
- make lambda functions idempotent to prevent duplicate execution
- handle partial failures in SQS and Kinesis batch processing
- implement feature flags in serverless applications
- validate and parse lambda event payloads with pydantic
- build REST APIs with lambda function URLs and API Gateway

## When to choose
- you run workloads on AWS Lambda and want observability (logs, traces, metrics) with minimal boilerplate
- you need battle-tested implementations of idempotency, batch partial failure handling, or parameter caching
- you want progressive adoption of serverless best practices via pip, Lambda Layers, or SAR
- you use multiple languages (Python, TypeScript, Java, .NET) and want consistent utilities across them

## When to avoid
- your functions run outside AWS Lambda (the toolkit is tightly coupled to Lambda context and event schemas)
- you already have an established observability stack and don't want CloudWatch-centric logging and metrics
- you need a general-purpose web framework rather than Lambda-specific utilities
- you want zero AWS SDK or CloudWatch dependencies in your codebase

## Facets
- artifact type: library
- maturity: stable
- function: logging, tracing, monitoring, feature-flags, middleware, serialization, caching, rate-limiting, workflow-automation, developer-tools
- domain: cloud-computing, developer-tools, backend, monitoring, apis
- platform: python, serverless, cloud
- tags: aws-lambda, serverless, observability, cloudwatch, idempotency, batch-processing, event-handler, structured-logging, x-ray, aws

## Member repositories
- aws-powertools/powertools-lambda-python (main) score 98
- aws-powertools/powertools-lambda-typescript (main) score 99

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:53.566346+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:43:19.718025+00:00, confidence not recorded.
  - readme: https://github.com/aws-powertools/powertools-lambda-python (fetched 2026-08-28T04:07:53.566346+00:00, sha 4432a0158a17)
  - homepage: https://docs.powertools.aws.dev/lambda/python/latest/ (fetched 2026-08-29T09:36:30.431789+00:00, sha ba5102825b92)
  - site_page: https://docs.aws.amazon.com/powertools/python/latest/lambda-features/managed-instances (fetched 2026-08-29T09:36:30.448224+00:00, sha 283fcb2b2724)
  - site_page: https://docs.aws.amazon.com/powertools/python/latest/lambda-features/durable-functions (fetched 2026-08-29T09:36:30.450325+00:00, sha aa957ad80969)
  - site_page: https://docs.aws.amazon.com/powertools/python/latest/api_doc/batch/base (fetched 2026-08-29T09:36:30.434974+00:00, sha 02a42ca85bf5)
  - site_page: https://docs.aws.amazon.com/powertools/python/latest/getting-started/install (fetched 2026-08-29T09:36:30.437582+00:00, sha 3a5eb8b720c7)
  - site_page: https://docs.aws.amazon.com/powertools/python/latest/changelog (fetched 2026-08-29T09:36:30.441368+00:00, sha a6208e33753b)
  - site_page: https://docs.aws.amazon.com/powertools/python/latest/lambda-features (fetched 2026-08-29T09:36:30.445501+00:00, sha 2375a7db63f6)
  - site_page: https://docs.aws.amazon.com/powertools/python/latest/build_recipes/getting-started (fetched 2026-08-29T09:36:30.460986+00:00, sha d34b7698946e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
