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.43.0 to 3.1.0 in /lambda/src #793

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

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 14, 2024

Bumps aws-lambda-powertools from 2.43.0 to 3.1.0.

Release notes

Sourced from aws-lambda-powertools's releases.

v3.1.0

Summary

We are excited to announce the first release following the v3 GA release. In this release we addressed a bug in the Parser utility as well as a regression in the naming of our public Lambda layers.

Thanks to @​mw-root we added support for Event Source for CodeDeploy Lifecycle Hook.

🌟 ⭐ A big thank you to our new contributors: @​emmanuel-ferdman, @​garysassano and @​mw-root.

Correct Naming for Powertools Lambda Layer x86_64

In our initial v3 release, we mistakenly named the x86_64 Lambda layer as x86. We've corrected this issue in the current release, ensuring our Lambda layers now use the correct architecture naming convention.

For those who have already adopted the v3 Layer for this architecture, we recommend updating the ARN to use the new name using the table below as reference. The version of the Layer using the incorrect name will continue to be available but new releases, including this one, will follow the correct and updated naming convention.

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

New CodeDeploy Lifecycle Hook Event Source Data Class

Docs

You can now use CodeDeployLifecycleHookEvent for a better experience with type hinting and code completion support when working with AWS Lambda functions that process AWS CodeDeploy events.

dataclass_code

Parser utility is now returning ValidationError

Before this release when parsing an event failed, we were catching the ValidationError raised by Pydantic and re-raising it as an InvalidModelTypeError.

We now raise the ValidationError directly, allowing our customers to handle data validation errors more effectively.

Thanks for this important bug report @​jhare-rectangle

Acknowledgements

Last but not least, we are thrilled to see our customers adopting v3, as it indicates we are moving in the right direction.

Changes

🌟New features and non-breaking changes

... (truncated)

Changelog

Sourced from aws-lambda-powertools's changelog.

[v3.1.0] - 2024-10-08

Bug Fixes

  • ci: Layer Rename Fix (#5291)
  • ci: layer rename (#5283)
  • idempotency: fix response hook invocation when function returns None (#5251)
  • layer: reverting SSM parameter name (#5340)
  • layers: rename Lambda layer name from x86 to x86_64 (#5226)
  • parser: fallback to validate_python when using type[Model] and nested models (#5313)
  • parser: revert a regression in v3 when raising ValidationError (#5259)
  • parser: make size and etag optional for LifecycleExpiration events in S3 (#5250)

Code Refactoring

  • examples: fix issues reported by SonarCloud and Scorecard (#5315)

Documentation

  • idempotency: fix description in Advanced table (#5191)
  • metrics: fix test references (#5265)
  • public_reference: add Flyweight as a public reference (#5322)
  • upgrade_guide: update upgrade guide with Pydantic information (#5316)
  • v3: fix small things in the documentation (#5224)
  • versioning: add v2 maintainance mode banner (#5240)

Features

  • event_source: add CodeDeploy Lifecycle Hook event (#5219)
  • openapi: enable direct list input in Examples model (#5318)

Maintenance

  • version bump
  • ci: new pre-release 3.0.1a7 (#5299)
  • ci: new pre-release 3.0.1a3 (#5270)
  • ci: new pre-release 3.0.1a4 (#5277)
  • ci: new pre-release 3.0.1a2 (#5258)
  • ci: new pre-release 3.0.1a5 (#5288)
  • ci: new pre-release 3.0.1a9 (#5337)
  • ci: new pre-release 3.0.1a8 (#5323)
  • ci: new pre-release 3.0.1a0 (#5220)
  • ci: new pre-release 3.0.1a1 (#5247)
  • ci: new pre-release 3.0.1a6 (#5293)
  • deps: bump actions/download-artifact from 4.1.7 to 4.1.8 (#5203)
  • deps: bump squidfunk/mkdocs-material from 22a429f to 08fbf58 in /docs (#5243)
  • deps: bump docker/setup-buildx-action from 3.6.1 to 3.7.0 (#5298)
  • deps: bump actions/checkout from 4.1.7 to 4.2.0 (#5244)
  • deps: bump actions/setup-node from 4.0.3 to 4.0.4 (#5186)
  • deps: bump docker/setup-buildx-action from 3.7.0 to 3.7.1 (#5310)
  • deps: bump pypa/gh-action-pypi-publish from 1.10.2 to 1.10.3 (#5311)

... (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
  • e615b9f chore: version bump
  • d3173f3 fix(layer): reverting SSM parameter name (#5340)
  • fa69986 chore(ci): new pre-release 3.0.1a9 (#5337)
  • 54ee168 chore(deps): bump datadog-lambda from 6.98.0 to 6.99.0 (#5333)
  • b181910 chore(deps-dev): bump boto3-stubs from 1.35.34 to 1.35.35 (#5334)
  • fbfe836 chore(deps-dev): bump aws-cdk-lib from 2.161.0 to 2.161.1 (#5335)
  • 65c4ed3 chore(deps): bump actions/upload-artifact from 4.4.0 to 4.4.1 (#5328)
  • 608b096 chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.272 to 0....
  • 8c8378e chore(deps): bump redis from 5.1.0 to 5.1.1 (#5331)
  • a4d710e chore(deps-dev): bump aws-cdk from 2.161.0 to 2.161.1 (#5327)
  • 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.43.0 to 3.1.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.0...v3.1.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 Oct 14, 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