Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 3, 2025

Bumps aws-lambda-powertools from 2.35.1 to 3.7.0.

Release notes

Sourced from aws-lambda-powertools's releases.

v3.7.0

Summary

In this release, we are thrilled to announce new features and improvements:

  • New Event Source Data Classes and Parser models for IoT Core Registry Events
  • Support for OpenAPI examples within parameters fields

We also fixed a bug in the Logger utility's custom handlers and expanded Lambda layer support to Thailand (ap-southeast-7) and Mexico Central (mx-central-1) regions.

⭐ Huge thanks to our new contributors: @​basvandriel and @​DKurilo

Working with IoT Core Registry Events with Parser

Docs

We have improved the Parser utility by adding support for events from IoT Core Registry Events

parser (1)

Here are all the models we have added for IoT Core Registry Events:

  • IoTCoreThingEvent - For Things Created/Updated/Deleted events
  • IoTCoreThingTypeEvent - For Thing Type Created/Updated/Deprecated/Deleted events
  • IoTCoreThingTypeAssociationEvent - For associating or disassociating a thing events
  • IoTCoreThingGroupEvent - For Thing Group Created/Updated/Deleted events
  • IoTCoreAddOrRemoveFromThingGroupEvent - For adding or removing a thing from a group events
  • IoTCoreAddOrDeleteFromThingGroupEvent - For adding or deleting a group within another group events

Adding examples to the OpenAPI schema

Docs

You can now include specific examples of parameter values directly in the schema objects. These examples are rendered in API documentation tools like SwaggerUI and provide a better experience when reading the OpenAPI schema.

openapi

Using Logger custom handlers

Docs

Customers can now rely on a correct logger handler selection in compute environments or custom setups where a standard logging logger shares the same name as a Powertools logger.

logger

Changes

🌟New features and non-breaking changes

... (truncated)

Changelog

Sourced from aws-lambda-powertools's changelog.

[v3.7.0] - 2025-02-25

Bug Fixes

  • logger: correctly pick powertools or custom handler in custom environments (#6083)
  • openapi: validate response serialization when falsy (#6119)
  • parser: fix data types for sourceIPAddress and sequencer fields in S3RecordModel Model (#6154)
  • parser: fix EventBridgeModel when working with scheduled events (#6134)
  • security: fix encryption_context handling in data masking operations (#6074)

Documentation

  • roadmap: update roadmap (#6077)

Features

  • batch: raise exception for invalid batch event (#6088)
  • event_handler: add support for defining OpenAPI examples in parameters (#6086)
  • layers: add new comercial region ap-southeast-7 and mx-central-1 (#6109)
  • parser: Event source dataclasses for IoT Core Registry Events (#6123)
  • parser: Add IoT registry events models (#5892)

Maintenance

  • version bump
  • ci: new pre-release 3.6.1a9 (#6157)
  • ci: new pre-release 3.6.1a8 (#6152)
  • ci: new pre-release 3.6.1a4 (#6120)
  • ci: new pre-release 3.6.1a3 (#6107)
  • ci: new pre-release 3.6.1a0 (#6084)
  • ci: new pre-release 3.6.1a5 (#6124)
  • ci: new pre-release 3.6.1a7 (#6139)
  • ci: new pre-release 3.6.1a1 (#6090)
  • ci: new pre-release 3.6.1a6 (#6132)
  • ci: new pre-release 3.6.1a2 (#6098)
  • ci: remove python3.8 runtime when bootstrapping a new region (#6101)
  • deps: bump squidfunk/mkdocs-material from f5bcec4 to 2615302 in /docs (#6135)
  • deps: bump squidfunk/mkdocs-material from c62453b to f5bcec4 in /docs (#6087)
  • deps: bump actions/upload-artifact from 4.6.0 to 4.6.1 (#6144)
  • deps: bump aws-actions/configure-aws-credentials from 4.0.3 to 4.1.0 (#6082)
  • deps: bump pydantic-settings from 2.7.1 to 2.8.0 (#6147)
  • deps: bump ossf/scorecard-action from 2.4.0 to 2.4.1 (#6143)
  • deps: bump slsa-framework/slsa-github-generator from 2.0.0 to 2.1.0 (#6155)
  • deps: bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.21 to 3.0.22 (#6113)
  • deps-dev: bump cdklabs-generative-ai-cdk-constructs from 0.1.292 to 0.1.293 (#6129)
  • deps-dev: bump sentry-sdk from 2.21.0 to 2.22.0 (#6114)
  • deps-dev: bump bandit from 1.8.2 to 1.8.3 (#6117)
  • deps-dev: bump mkdocstrings-python from 1.15.0 to 1.16.0 (#6118)
  • deps-dev: bump boto3-stubs from 1.36.19 to 1.36.22 (#6116)
  • deps-dev: bump cfn-lint from 1.24.0 to 1.25.1 (#6115)
  • deps-dev: bump mkdocstrings-python from 1.16.0 to 1.16.1 (#6128)

... (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

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.

DynamoDBStreamModel in parser

!!! info "This also applies if you're using DynamoDB BatchProcessor{target="_blank"}."

DynamoDBStreamModel now returns native Python types when you access DynamoDB records through Keys, NewImage, and OldImage attributes.

... (truncated)

Commits
  • aadd4da chore: version bump
  • 79d57d8 feat(parser): Event source dataclasses for IoT Core Registry Events (#6123)
  • 1258d6d chore(deps): bump slsa-framework/slsa-github-generator from 2.0.0 to 2.1.0 (#...
  • 9ce2af6 chore(ci): new pre-release 3.6.1a9 (#6157)
  • b72078f fix(parser): fix data types for sourceIPAddress and sequencer fields in S...
  • 3544c54 chore(ci): new pre-release 3.6.1a8 (#6152)
  • 360da8a chore(deps): bump ossf/scorecard-action from 2.4.0 to 2.4.1 (#6143)
  • d96e93f chore(deps): bump pydantic-settings from 2.7.1 to 2.8.0 (#6147)
  • bcfa47d chore(deps-dev): bump aws-cdk-lib from 2.179.0 to 2.180.0 (#6148)
  • 1a31afc chore(deps-dev): bump boto3-stubs from 1.36.25 to 1.36.26 (#6146)
  • Additional commits viewable in compare view

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.7.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.7.0)

---
updated-dependencies:
- dependency-name: aws-lambda-powertools
  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 Mar 3, 2025
@dependabot dependabot bot temporarily deployed to pull-request March 3, 2025 01:55 Inactive
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 3, 2025

@github-actions
Copy link

github-actions bot commented Mar 3, 2025

💥 Something went wrong while building the pull request environment.
Check Output Logs

@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Mar 10, 2025

Superseded by #859.

@dependabot dependabot bot closed this Mar 10, 2025
@dependabot dependabot bot deleted the dependabot/pip/aws-lambda-powertools-3.7.0 branch March 10, 2025 01:48
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