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 from 2.34.0 to 3.4.0 #118

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 Dec 23, 2024

Bumps aws-lambda-powertools from 2.34.0 to 3.4.0.

Release notes

Sourced from aws-lambda-powertools'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's changelog.

[v3.4.0] - 2024-12-20

Bug Fixes

  • ci: add overwrite to SSM workflow (#5775)
  • docs: typo in homepage extra dependencies command (#5681)
  • openapi: Allow values of any type in the examples of the Schema Object. (#5575)
  • parser: remove AttributeError validation from event_parser function (#5742)
  • parser: remove 'aws:' prefix from SelfManagedKafka model (#5584)

Code Refactoring

  • event_handler: add type annotations for router decorators (#5601)
  • event_handler: add type annotations for resolve function (#5602)

Documentation

  • layer: update layer version number - v3.3.0 (#5562)

Features

  • event_handler: mark API operation as deprecated for OpenAPI documentation (#5732)
  • event_handler: add exception handling mechanism for AppSyncResolver (#5588)
  • event_source: Extend CodePipeline Artifact Capabilities (#5448)
  • layer: add new ap-southeast-5 region (#5769)
  • metrics: warn when overwriting dimension (#5653)
  • parser: add models for API GW Websockets events (#5597)
  • ssm: Parameters for resolving to versioned layers (#5754)

Maintenance

  • version bump
  • ci: new pre-release 3.3.1a14 (#5713)
  • ci: new pre-release 3.3.1a21 (#5773)
  • ci: new pre-release 3.3.1a0 (#5565)
  • ci: new pre-release 3.3.1a1 (#5577)
  • ci: disable dry run in layer balancing workflow (#5768)
  • ci: new pre-release 3.3.1a20 (#5766)
  • ci: new pre-release 3.3.1a10 (#5679)
  • ci: add workflow to balance layers per region (#5752)
  • ci: new pre-release 3.3.1a9 (#5668)
  • ci: new pre-release 3.3.1a19 (#5757)
  • ci: new pre-release 3.3.1a8 (#5663)
  • ci: adding missing region in matrix (#5777)
  • ci: new pre-release 3.3.1a2 (#5585)
  • ci: new pre-release 3.3.1a11 (#5688)
  • ci: new pre-release 3.3.1a3 (#5598)
  • ci: new pre-release 3.3.1a7 (#5656)
  • ci: new pre-release 3.3.1a6 (#5650)
  • ci: new pre-release 3.3.1a12 (#5697)
  • ci: new pre-release 3.3.1a18 (#5739)

... (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.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
  • 1eb7825 chore: version bump
  • 9720d06 chore(ci): adding missing region in matrix (#5777)
  • a44bd6d fix(parser): remove AttributeError validation from event_parser function (#5742)
  • aded1a9 fix(ci): add overwrite to SSM workflow (#5775)
  • 1575b40 feat(ssm): Parameters for resolving to versioned layers (#5754)
  • 4e2e452 chore(ci): changelog rebuild (#5774)
  • 1f3fd8d chore(ci): new pre-release 3.3.1a21 (#5773)
  • 2e34f0b chore(deps-dev): bump ruff from 0.8.3 to 0.8.4 (#5772)
  • 4524125 chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.173.1a0 to 2.173...
  • 303bd9f chore(deps-dev): bump boto3-stubs from 1.35.84 to 1.35.85 (#5770)
  • 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.34.0 to 3.4.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.34.0...v3.4.0)

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

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Dec 23, 2024
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