pypi aws-lambda-powertools 2.26.0
v2.26.0

latest releases: 3.2.1a14, 3.2.1a13, 3.2.1a12...
13 months ago

v2.26.0 Release notes

Summary

This release adds richer exception details to the logger utility, support for VPC Lattice Payload V2, smarter model inference in the parser utility, expanded ARM64 Lambda Layer support on additional regions, and fixes some bugs!

⭐ Huge thanks to our new contributors: @Tom01098, @stevrobu, and @pgrzesik!

Richer exception details

Docs: logger

The logger utility now logs exceptions in a structured format to simplify debugging. Previously, exception tracebacks appeared as a single string containing the raw stack trace frames. Developers had to parse each frame manually to extract file names, line numbers, function names, etc.

With the new serialize_stacktrace flag, the logger prints stack traces as structured JSON. This clearly surfaces exception details like filenames, lines, functions, and statements per frame. The structured output eliminates the need to parse traceback strings, improving observability and accelerating root cause analysis.

image

image

Amazon VPC Lattice Payload V2

Docs: event handler, parser

Amazon VPC Lattice is a fully managed application networking service that you use to connect, secure, and monitor the services for your application across multiple accounts and virtual private clouds (VPC). You can register your Lambda functions as targets with a VPC Lattice target group, and configure a listener rule to forward requests to the target group for your Lambda function.

With this seamless integration, you can now leverage the performance benefits of Amazon VPC Lattice Payload V2 directly in your event handlers. The latest release enables handling Lattice events using the familiar event handler API you already know, including critical features like CORS support and response serialization.

image

Model inference in the parser utility

Docs: parser

The event_parser decorator previously required you to duplicate the type when using type hints. Now, the event_parser decorator can infer the event type directly from your handler signature. This avoids having to redeclare the type in the event_parser decorator.

image

Changes

🌟New features and non-breaking changes

📜 Documentation updates

  • fix(logger): force Logger to use local timezone when UTC flag is not set (#3168) by @roger-zhangg
  • docs(event_handler): add information about case-insensitive header lookup function (#3183) by @pgrzesik
  • chore(deps): bump squidfunk/mkdocs-material from a4cfa88 to cb38dc2 in /docs (#3189) by @dependabot
  • chore(deps): bump gitpython from 3.1.35 to 3.1.37 in /docs (#3188) by @dependabot
  • docs(contributing): initial structure for revamped contributing guide (#3133) by @heitorlessa
  • chore(deps): bump squidfunk/mkdocs-material from cbfecae to a4cfa88 in /docs (#3175) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from e5f28aa to cbfecae in /docs (#3157) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from 06673a1 to e5f28aa in /docs (#3134) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from b41ba6d to 06673a1 in /docs (#3124) by @dependabot

🐛 Bug and hot fixes

🔧 Maintenance

  • fix(logger): force Logger to use local timezone when UTC flag is not set (#3168) by @roger-zhangg
  • chore(deps-dev): bump the boto-typing group with 1 update (#3196) by @dependabot
  • chore(deps): bump the layer-balancer group in /layer/scripts/layer-balancer with 3 updates (#3198) by @dependabot
  • chore(deps): bump aws-xray-sdk from 2.12.0 to 2.12.1 (#3197) by @dependabot
  • chore(deps-dev): bump sentry-sdk from 1.31.0 to 1.32.0 (#3192) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from a4cfa88 to cb38dc2 in /docs (#3189) by @dependabot
  • chore(deps): bump gitpython from 3.1.35 to 3.1.37 in /docs (#3188) by @dependabot
  • feat(logger): new stack_trace field with rich exception details (#3147) by @stevrobu
  • chore(deps-dev): bump aws-cdk from 2.99.1 to 2.100.0 (#3185) by @dependabot
  • chore(deps): bump the layer-balancer group in /layer/scripts/layer-balancer with 3 updates (#3177) by @dependabot
  • chore(deps): bump ossf/scorecard-action from 2.2.0 to 2.3.0 (#3178) by @dependabot
  • chore(deps-dev): bump cfn-lint from 0.80.4 to 0.81.0 (#3179) by @dependabot
  • docs(contributing): initial structure for revamped contributing guide (#3133) by @heitorlessa
  • chore(deps): bump the layer-balancer group in /layer/scripts/layer-balancer with 1 update (#3174) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from cbfecae to a4cfa88 in /docs (#3175) by @dependabot
  • chore(deps-dev): bump the boto-typing group with 1 update (#3170) by @dependabot
  • chore(deps-dev): bump cfn-lint from 0.80.3 to 0.80.4 (#3166) by @dependabot
  • chore(deps-dev): bump urllib3 from 1.26.16 to 1.26.17 in /layer (#3163) by @dependabot
  • chore(deps): bump urllib3 from 1.26.16 to 1.26.17 (#3162) by @dependabot
  • chore(deps-dev): bump ruff from 0.0.291 to 0.0.292 (#3161) by @dependabot
  • chore(deps): bump fastjsonschema from 2.18.0 to 2.18.1 (#3159) by @dependabot
  • chore(deps): bump actions/setup-python from 4.7.0 to 4.7.1 (#3158) by @dependabot
  • chore(deps-dev): bump aws-cdk from 2.99.0 to 2.99.1 (#3155) by @dependabot
  • chore(deps): bump the layer-balancer group in /layer/scripts/layer-balancer with 1 update (#3156) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from e5f28aa to cbfecae in /docs (#3157) by @dependabot
  • chore(deps-dev): bump aws-cdk from 2.98.0 to 2.99.0 (#3148) by @dependabot
  • chore(deps-dev): bump types-requests from 2.31.0.5 to 2.31.0.6 (#3145) by @dependabot
  • chore(deps): bump pydantic from 1.10.12 to 1.10.13 (#3144) by @dependabot
  • chore(deps-dev): bump the boto-typing group with 2 updates (#3143) by @dependabot
  • feat(data_masking): add new sensitive data masking utility (#2197) by @seshubaws
  • chore(deps-dev): bump aws-cdk from 2.97.0 to 2.98.0 (#3139) by @dependabot
  • chore(deps-dev): bump types-requests from 2.31.0.3 to 2.31.0.5 (#3136) by @dependabot
  • chore(deps-dev): bump the boto-typing group with 1 update (#3135) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from 06673a1 to e5f28aa in /docs (#3134) by @dependabot
  • chore(deps-dev): bump ruff from 0.0.290 to 0.0.291 (#3126) by @dependabot
  • chore(deps): bump actions/checkout from 4.0.0 to 4.1.0 (#3128) by @dependabot
  • chore(deps-dev): bump aws-cdk from 2.96.2 to 2.97.0 (#3129) by @dependabot
  • chore(deps): bump the layer-balancer group in /layer/scripts/layer-balancer with 1 update (#3127) by @dependabot
  • chore(deps-dev): bump cfn-lint from 0.80.2 to 0.80.3 (#3125) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from b41ba6d to 06673a1 in /docs (#3124) by @dependabot

This release was made possible by the following contributors:

@Tom01098, @dependabot, @dependabot[bot], @github-actions, @github-actions[bot], @heitorlessa, @leandrodamascena, @rubenfonseca, @pgrzesik, @roger-zhangg, @seshubaws, @stephenbawks and @stevrobu

Don't miss a new aws-lambda-powertools release

NewReleases is sending notifications on new releases.