Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump aws-lambda-powertools[parser] from 2.41.0 to 3.4.1 #265

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 14, 2025

Bumps aws-lambda-powertools[parser] from 2.41.0 to 3.4.1.

Release notes

Sourced from aws-lambda-powertools[parser]'s releases.

v3.4.0

Summary

We are thrilled to announce support for querying Powertools Lambda layers ARN using SSM public parameters.

We also added support for API Gateway WebSocket events in the parser utility and added Lambda layer support in the AWS Malaysia region (ap-southeast-5).

Thanks to @​tcysin, we have added deprecated flag support when working with OpenAPI operations in the Event handler.

🌟 ⭐ Congratulations to our new contributors @​TurnrDev and @​tcysin for getting their first PR merged!

Using Powertools SSM public parameters

Docs

Customers can now retrieve the latest Powertools for AWS Lambda (Python) layer ARN for Python versions 3.8 through 3.13 on both x86_64 and arm64 architectures using AWS Systems Manager Parameter Store.

To do this, simply use the AWS CLI command aws ssm get-parameter with the appropriate parameter name. For example, use /aws/service/powertools/python/<architecture>/<python_version>/latest , replacing with either "x86_64" or "arm64", and with your desired Python version (e.g., "python3.8", "python3.9", etc.).

New parser models

Docs

We have improved the Parser utility by adding support for events from API Gateway WebSocket.

image

Here are all the modules we have added for EventModel:

  • APIGatewayWebSocketMessageEventModel - For WebSocket messages events
  • APIGatewayWebSocketConnectEventModel - For WebSocket $connect events
  • APIGatewayWebSocketDisconnectEventModel - For WebSocket $disconnect events

🚀 Thanks @​ran-isenberg for another great contribution!

Using deprecated flag in the OpenAPI schema

Docs

You can now use the deprecated flag in your OpenAPI schema to mark operations that are no longer recommended. This helps customers clarify which parts of your API should be avoided in favor of newer options.

image

Last but not least, thanks to @​junkor-1011 for catching a bug in the Parser utility.

Changes

... (truncated)

Changelog

Sourced from aws-lambda-powertools[parser]'s changelog.

Unreleased

Bug Fixes

  • appsync: enhance consistency for custom resolver field naming in AppSync (#5801)
  • idempotency: add support for Optional type when serializing output (#5590)

Documentation

  • home: fix date typo and shorten message. (#5798)
  • layer: update layer version number - v3.4.0 (#5785)

Maintenance

  • ci: new pre-release 3.4.1a0 (#5783)
  • ci: new pre-release 3.4.1a1 (#5789)
  • ci: new pre-release 3.4.1a9 (#5822)
  • ci: new pre-release 3.4.1a2 (#5791)
  • ci: new pre-release 3.4.1a8 (#5818)
  • ci: new pre-release 3.4.1a7 (#5816)
  • ci: new pre-release 3.4.1a6 (#5813)
  • ci: new pre-release 3.4.1a5 (#5807)
  • ci: new pre-release 3.4.1a3 (#5794)
  • ci: new pre-release 3.4.1a4 (#5796)
  • deps: bump pydantic-settings from 2.7.0 to 2.7.1 (#5815)
  • deps: bump jinja2 from 3.1.4 to 3.1.5 in /docs (#5787)
  • deps-dev: bump boto3-stubs from 1.35.90 to 1.35.92 (#5827)
  • deps-dev: bump mypy from 1.14.0 to 1.14.1 (#5812)
  • deps-dev: bump boto3-stubs from 1.35.89 to 1.35.90 (#5809)
  • deps-dev: bump cdklabs-generative-ai-cdk-constructs from 0.1.287 to 0.1.288 (#5793)
  • deps-dev: bump cfn-lint from 1.22.2 to 1.22.3 (#5810)
  • deps-dev: bump aws-cdk-aws-lambda-python-alpha from 2.173.2a0 to 2.173.4a0 (#5811)
  • deps-dev: bump aws-cdk-lib from 2.173.4 to 2.174.1 (#5838)
  • deps-dev: bump boto3-stubs from 1.35.87 to 1.35.89 (#5804)
  • deps-dev: bump jinja2 from 3.1.4 to 3.1.5 (#5788)
  • deps-dev: bump aws-cdk from 2.173.2 to 2.173.4 (#5802)
  • deps-dev: bump boto3-stubs from 1.35.86 to 1.35.87 (#5786)
  • deps-dev: bump aws-cdk from 2.173.4 to 2.174.0 (#5832)
  • deps-dev: bump ruff from 0.8.4 to 0.8.6 (#5833)
  • deps-dev: bump boto3-stubs from 1.35.85 to 1.35.86 (#5780)
  • deps-dev: bump mypy from 1.13.0 to 1.14.0 (#5779)
  • deps-dev: bump boto3-stubs from 1.35.92 to 1.35.93 (#5835)
  • deps-dev: bump aws-cdk-lib from 2.173.2 to 2.173.4 (#5803)

... (truncated)

Upgrade guide

Sourced from aws-lambda-powertools[parser]'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.8.
  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
  • 79eba7e chore: version bump
  • c1094d4 chore(ci): change token permissions (#5865)
  • 2bbf4be chore(deps-dev): bump ruff from 0.8.6 to 0.9.1 (#5853)
  • 7d85168 chore(deps-dev): bump aws-cdk from 2.175.0 to 2.175.1 (#5863)
  • 27737cf chore(ci): change token permissions (#5862)
  • 09001b2 chore(ci): change token permissions / update aws-credentials action (#5861)
  • 1b81fbf chore(ci): fix dependency resolution (#5859)
  • 2364fb1 chore(ci): fix dependency resolution (#5858)
  • 0fe4ab7 chore(deps-dev): bump aws-cdk-lib from 2.174.1 to 2.175.1 (#5856)
  • a0d0425 chore(deps-dev): bump aws-cdk from 2.174.1 to 2.175.0 (#5854)
  • 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[parser]](https://github.com/aws-powertools/powertools-lambda-python) from 2.41.0 to 3.4.1.
- [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.41.0...v3.4.1)

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

Signed-off-by: dependabot[bot] <[email protected]>
Copy link
Contributor Author

dependabot bot commented on behalf of github Jan 14, 2025

The following labels could not be found: dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants