Skip to content

chore(deps): bump aws-lambda-powertools from 2.43.1 to 3.0.0 in /unicorn_web #123

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

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Sep 30, 2024

Bumps aws-lambda-powertools from 2.43.1 to 3.0.0.

Release notes

Sourced from aws-lambda-powertools's releases.

v3.0.0

Summary

We are super happy to announce our new major version – v3.0.0 πŸŽ‰πŸŽ‰!

We have made Pydantic v2 the default for Powertools for AWS Lambda (Python) utilities, this was the most requested feature from you. Pydantic v2 is the most impactful upgrade, offering better performance and greater flexibility compared to Pydantic v1.

The second most requested feature was publishing Powertools Lambda layers for different Python versions and architectures, allowing for easier integration across various Lambda environments. This is crucial for libraries like Pydantic v2 and AWS Encryption SDK, which are used by Powertools and require installation for specific architectures and Python version.

🌟 We couldn’t have done this without you 🌟

Thanks to everyone in the community for their patience and assistance as we've been working on this release. A special thanks to @​ericbn for their amazing contributions to this milestone.

We care deeply about minimizing breaking changes

Over the past few months, we carefully selected each breaking change to make, and crafted an extensive upgrade guide to ease your transition to v3. Please let us know whether we can make your upgrade process easier.

Note

The section below is an excerpt of what's available in the Upgrade guide

What’s New in v3

  • Drop support for Pydantic v1
  • New AWS Lambda Layer ARNs
  • New default values for Event Source Data Classes
  • Headers are now case-insensitive in Event Handler
  • Backwards incompatible changes

Drop support for Pydantic v1

We no longer support Pydantic v1 and have updated our toolkit to support only v2 of the library. We made this change after Pydantic v1 reached End-of-Life on June 2024.

Use the Pydantic v2 Migration Guide to migrate your custom Pydantic models to v2.

New AWS Lambda Layer ARNs

To give you a better experience, we're now building our public Powertools for AWS Lambda (Python)'s Lambda layers for specific Python versions (3.8-3.12) and architectures (x86_64 & arm64).

With this change we can now include architecture-specific versions of both Pydantic v2 and AWS Encryption SDK and give you a more streamlined setup.

To take advantage of the new layers, you need to update your functions or deployment setup to include one of the new Lambda layer ARN from the table below:

Architecture Python Version Layer ARN
x86_64 3.8 arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python38-x86:{version}
x86_64 3.9 arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python39-x86:{version}
x86_64 3.10 arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python310-x86:{version}
x86_64 3.11 arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python311-x86:{version}

... (truncated)

Changelog

Sourced from aws-lambda-powertools's changelog.

[v3.0.0] - 2024-09-23

Bug Fixes

  • v3: revert unnecessary changes that impacts v3 (#5087)

Code Refactoring

  • batch: add from future import annotations (#4993)
  • batch_processing: mark batch_processor and async_batch_processor as deprecated (#4910)
  • data_classes: add from future import annotations (#4939)
  • data_masking: add from future import annotations (#4945)
  • event_handler: add from future import annotations (#4992)
  • event_handler: add from future import annotations in the Middlewares (#4975)
  • feature_flags: add from future import annotations (#4960)
  • general: drop pydantic v1 (#4305)
  • idempotency: add from future import annotations (#4961)
  • jmespath_utils: deprecate extract_data_from_envelope in favor of query (#4907)
  • jmespath_utils: add from future import annotations (#4962)
  • logging: add from future import annotations (#4940)
  • metrics: add from future import annotations (#4944)
  • middleware_factory: add from future import annotations (#4941)
  • openapi: add from future import annotations (#4990)
  • parameters: deprecate the config parameter in favor of boto_config (#4893)
  • parameters: add top-level get_multiple method in SSMProvider class (#4785)
  • parameters: add from future import annotations (#4976)
  • parameters: increase default max_age (cache) to 5 minutes (#4279)
  • parser: add from future import annotations (#4977)
  • parser: add from future import annotations (#4983)
  • shared: add from future import annotations (#4942)
  • streaming: add from future import annotations (#4987)
  • tracing: add from future import annotations (#4943)
  • typing: add from future import annotations (#4985)
  • typing: enable TCH, UP and FA100 ruff rules (#5017)
  • typing: reduce aws_lambda_powertools.shared.types usage (#4896)
  • typing: enable boto3 implicit type annotations (#4692)
  • typing: move more types into TYPE_CHECKING (#5088)
  • validation: add from future import annotations (#4984)

Documentation

  • upgrade_guide: create upgrade guide from v2 to v3 (#5028)

Features

  • data_classes: return empty dict or list instead of None (#4606)
  • event_handler: Ensure Bedrock Agents resolver works with Pydantic v2 (#5156)
  • idempotency: simplify access to expiration time in DataRecord class (#5082)
  • lambda-layer: add pipeline to build Lambda layer in v3 (#4826)
  • parser: Adds DDB deserialization to DynamoDBStreamChangedRecordModel (#4401)
  • parser: Allow primitive data types to be parsed using TypeAdapter (#4502)

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

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.43.1 to 3.0.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.43.1...v3.0.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 requested a review from a team as a code owner September 30, 2024 16:38
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Sep 30, 2024
@github-actions github-actions bot added the internal Maintenance changes label Sep 30, 2024
Copy link
Contributor Author

dependabot bot commented on behalf of github Oct 14, 2024

Superseded by #136.

@dependabot dependabot bot closed this Oct 14, 2024
@dependabot dependabot bot deleted the dependabot/pip/unicorn_web/aws-lambda-powertools-3.0.0 branch October 14, 2024 16:42
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 internal Maintenance changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants