Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 13, 2025

Bumps aws-lambda-powertools from 2.35.1 to 3.21.0.

Release notes

Sourced from aws-lambda-powertools's releases.

v3.21.0

Summary

This release enhances our Event Handler with support for Pydantic Field discriminators and improved OpenAPI response capabilities. We've also expanded our Parser utility with better AppSync and CloudWatch models, plus important bug fixes for form data handling.

⭐️ Congrats to @​dap0am, @​tonnico, @​sreejaaryahi18, @​aalvrzf, @​Iamrodos, and @​dcabib for contributing to this release!

Pydantic Field discriminator support

Docs

You can now use Pydantic's discriminator feature in your Event Handler validation. This allows you to handle polymorphic data structures with union types more efficiently.

Enhanced OpenAPI responses

The OpenAPI utility now supports richer response definitions including headers, links, examples, and encoding specifications, giving you more control over your API documentation.

Changes

  • refactor(parser): Improve AppSync models with examples and descriptions (#7330) by @​dcabib

🌟New features and non-breaking changes

  • feat(event_handler): enhance OpenAPI response with headers, links, examples and encoding (#7312) by @​dcabib
  • feat(parser): add field metadata and examples for CloudWatch models (#7343) by @​sreejaaryahi18

📜 Documentation updates

🐛 Bug and hot fixes

🔧 Maintenance

... (truncated)

Changelog

Sourced from aws-lambda-powertools's changelog.

[v3.21.0] - 2025-10-08

Bug Fixes

  • docs: correct build optimization script and docs (#7367)
  • event_handler: parse single list items in form data (#7415)

Code Refactoring

  • parser: Improve AppSync models with examples and descriptions (#7330)

Documentation

  • aws: add AWS docs bootstrap JavaScript (#7472)
  • event_handler: remove the wrong CORS warning (#7385)
  • event_handler: update test section (#7374)
  • event_handler: add info section about types (#7368)
  • logger: clarify Advanced Logging Controls interaction with sampling (#7429)

Features

  • event-handler: add support for Pydantic Field discriminator in validation (#7227)
  • event_handler: enhance OpenAPI response with headers, links, examples and encoding (#7312)
  • parser: add field metadata and examples for CloudWatch models (#7343)

Maintenance

  • Fix Discord badge in README (#7488)
  • version bump
  • ci: new pre-release 3.20.1a12 (#7492)
  • ci: new pre-release 3.20.1a5 (#7418)
  • ci: new pre-release 3.20.1a0 (#7362)
  • ci: new pre-release 3.20.1a11 (#7485)
  • ci: new pre-release 3.20.1a4 (#7404)
  • ci: new pre-release 3.20.1a10 (#7479)
  • ci: new pre-release 3.20.1a3 (#7393)
  • ci: new pre-release 3.20.1a1 (#7372)
  • ci: new pre-release 3.20.1a9 (#7469)
  • ci: new pre-release 3.20.1a8 (#7456)
  • ci: new pre-release 3.20.1a6 (#7442)
  • ci: new pre-release 3.20.1a2 (#7383)
  • ci: new pre-release 3.20.1a7 (#7450)
  • deps: bump mkdocs-llmstxt from 0.3.1 to 0.3.2 (#7436)
  • deps: bump mkdocs-material from 9.6.20 to 9.6.21 in /docs (#7453)
  • deps: bump squidfunk/mkdocs-material from 86d21da to 00f9276 in /docs (#7452)
  • deps: bump ossf/scorecard-action from 2.4.2 to 2.4.3 (#7458)
  • deps: bump protobuf from 6.32.0 to 6.32.1 (#7376)
  • deps: bump pydantic-settings from 2.10.1 to 2.11.0 (#7434)
  • deps: bump mkdocs-material from 9.6.19 to 9.6.20 in /docs (#7387)
  • deps: bump mkdocs-llmstxt from 0.3.2 to 0.4.0 in /docs (#7473)
  • deps: bump mkdocs-material from 9.6.20 to 9.6.21 (#7455)

... (truncated)

Upgrade guide

Sourced from aws-lambda-powertools's upgrade guide.


title: Upgrade guide description: Guide to update between major Powertools for AWS Lambda (Python) versions

End of support v2

!!! warning "On March 25st, 2025, Powertools for AWS Lambda (Python) v2 reached end of support and will no longer receive updates or releases. If you are still using v2, we strongly recommend you to read our upgrade guide and update to the latest version."

Given our commitment to all of our customers using Powertools for AWS Lambda (Python), we will keep Pypi{target="_blank"} v2 releases and documentation 2.x versions to prevent any disruption.

Migrate to v3 from v2

!!! info "We strongly encourage you to migrate to v3. However, if you still need to upgrade from v1 to v2, you can find the upgrade guide."

We've made minimal breaking changes to make your transition to v3 as smooth as possible.

Quick summary

Area Change Code change required
Pydantic We have removed support for Pydantic v1 No
Parser We have replaced DynamoDBStreamModel AttributeValue with native Python types Yes
Parser We no longer export Pydantic objects from parser.pydantic. Yes
Lambda layer Lambda layers are now compiled according to the specific Python version and architecture No
Event Handler We have deprecated the get_header_value function. Yes
Batch Processor @batch_processor and @async_batch_processor decorators are now deprecated Yes
Event Source Data Classes We have updated default values for optional fields. Yes
Parameters The default cache TTL is now set to 5 minutes No
Parameters The config parameter is deprecated in favor of boto_config Yes
JMESPath Functions The extract_data_from_envelope function is deprecated in favor of query Yes
Types file We have removed the type imports from the shared/types.py file Yes

First Steps

Before you start, we suggest making a copy of your current working project or create a new branch with git.

  1. Upgrade Python to at least v3.9.
  2. Ensure you have the latest version via Lambda Layer or PyPi{target="_blank"}.
  3. Review the following sections to confirm if you need to make changes to your code.

Drop support for Pydantic v1

!!! note "No code changes required"

As of June 30, 2024, Pydantic v1 has reached its end-of-life, and we have discontinued support for this version. We now exclusively support Pydantic v2.

Use Pydantic v2 Migration Guide{target="_blank"} to migrate your custom Pydantic models to v2.

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [aws-lambda-powertools](https://github.com/aws-powertools/powertools-lambda-python) from 2.35.1 to 3.21.0.
- [Release notes](https://github.com/aws-powertools/powertools-lambda-python/releases)
- [Changelog](https://github.com/aws-powertools/powertools-lambda-python/blob/develop/CHANGELOG.md)
- [Upgrade guide](https://github.com/aws-powertools/powertools-lambda-python/blob/develop/docs/upgrade.md)
- [Commits](aws-powertools/powertools-lambda-python@v2.35.1...v3.21.0)

---
updated-dependencies:
- dependency-name: aws-lambda-powertools
  dependency-version: 3.21.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Oct 13, 2025
@dependabot dependabot bot requested a review from a team as a code owner October 13, 2025 01:04
@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Oct 13, 2025
@sonarqubecloud
Copy link

@github-actions
Copy link

🚀 PR environment successfully deployed.
Commit Hash: c74d19a238d590f46d48703417a300f2121974b4
URL: https://01ba47.api.record-locator.dev.national.nhs.uk/

@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Oct 27, 2025

Superseded by #1082.

@dependabot dependabot bot closed this Oct 27, 2025
@dependabot dependabot bot deleted the dependabot/pip/aws-lambda-powertools-3.21.0 branch October 27, 2025 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants