github aws-powertools/powertools-lambda-python v3.1.0

12 hours ago

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

πŸ“œ Documentation updates

πŸ› Bug and hot fixes

πŸ”§ Maintenance

  • chore(deps): bump datadog-lambda from 6.98.0 to 6.99.0 (#5333) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.34 to 1.35.35 (#5334) by @dependabot
  • chore(deps-dev): bump aws-cdk-lib from 2.161.0 to 2.161.1 (#5335) by @dependabot
  • chore(deps): bump actions/upload-artifact from 4.4.0 to 4.4.1 (#5328) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.272 to 0.1.273 (#5336) by @dependabot
  • chore(deps): bump redis from 5.1.0 to 5.1.1 (#5331) by @dependabot
  • chore(deps-dev): bump aws-cdk from 2.161.0 to 2.161.1 (#5327) by @dependabot
  • chore(deps): bump actions/checkout from 4.2.0 to 4.2.1 (#5329) by @dependabot
  • chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.160.0a0 to 2.161.0a0 (#5332) by @dependabot
  • chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.13 to 3.0.14 (#5330) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.15.2 to 1.16.0 (#5305) by @dependabot
  • chore(deps-dev): bump ruff from 0.6.8 to 0.6.9 (#5308) by @dependabot
  • chore(deps-dev): bump aws-cdk from 2.160.0 to 2.161.0 (#5309) by @dependabot
  • chore(deps): bump pypa/gh-action-pypi-publish from 1.10.2 to 1.10.3 (#5311) by @dependabot
  • chore(deps): bump docker/setup-buildx-action from 3.7.0 to 3.7.1 (#5310) by @dependabot
  • chore(deps-dev): bump types-redis from 4.6.0.20240903 to 4.6.0.20241004 (#5307) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.33 to 1.35.34 (#5306) by @dependabot
  • chore(deps-dev): bump aws-cdk-lib from 2.160.0 to 2.161.0 (#5304) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.271 to 0.1.272 (#5297) by @dependabot
  • chore(deps): bump docker/setup-buildx-action from 3.6.1 to 3.7.0 (#5298) by @dependabot
  • chore(deps-dev): bump types-python-dateutil from 2.9.0.20240906 to 2.9.0.20241003 (#5296) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.32 to 1.35.33 (#5295) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.31 to 1.35.32 (#5292) by @dependabot
  • chore(deps-dev): bump sentry-sdk from 2.14.0 to 2.15.0 (#5285) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.29 to 1.35.31 (#5286) by @dependabot
  • chore(deps): bump codecov/codecov-action from 4.5.0 to 4.6.0 (#5287) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.270 to 0.1.271 (#5284) by @dependabot
  • chore(tests): fix e2e tests in Idempotency utility (#5280) by @leandrodamascena
  • chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.12 to 3.0.13 (#5276) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.15.1 to 1.15.2 (#5274) by @dependabot
  • chore(deps-dev): bump multiprocess from 0.70.16 to 0.70.17 (#5275) by @dependabot
  • chore(deps-dev): bump mkdocs-material from 9.5.38 to 9.5.39 (#5273) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from 7aea359 to 8e8b333 in /docs (#5272) by @dependabot
  • chore(deps): bump redis from 5.0.8 to 5.1.0 (#5264) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.28 to 1.35.29 (#5263) by @dependabot
  • chore(deps-dev): bump mkdocs-material from 9.5.37 to 9.5.38 (#5255) by @dependabot
  • chore(deps-dev): bump ruff from 0.6.7 to 0.6.8 (#5254) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.27 to 1.35.28 (#5256) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.269 to 0.1.270 (#5257) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from 08fbf58 to 7aea359 in /docs (#5253) by @dependabot
  • chore(docs): recreate requirements.txt file for mkdocs container (#5246) by @leandrodamascena
  • chore(deps): bump actions/checkout from 4.1.7 to 4.2.0 (#5244) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.26 to 1.35.27 (#5242) by @dependabot
  • chore(deps-dev): bump mkdocs-material from 9.5.36 to 9.5.37 (#5241) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from 22a429f to 08fbf58 in /docs (#5243) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.25 to 1.35.26 (#5234) by @dependabot
  • chore(deps-dev): bump aws-cdk from 2.159.1 to 2.160.0 (#5233) by @dependabot
  • chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.159.1a0 to 2.160.0a0 (#5235) by @dependabot
  • chore(deps-dev): bump aws-cdk-lib from 2.159.1 to 2.160.0 (#5230) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.15.0 to 1.15.1 (#5232) by @dependabot
  • chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.158.0a0 to 2.159.1a0 (#5231) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.268 to 0.1.269 (#5229) by @dependabot
  • chore(deps): bump actions/setup-node from 4.0.3 to 4.0.4 (#5186) by @dependabot
  • chore(deps-dev): bump aws-cdk-lib from 2.158.0 to 2.159.1 (#5208) by @dependabot
  • chore(deps-dev): bump ruff from 0.6.4 to 0.6.7 (#5207) by @dependabot
  • chore(deps-dev): bump aws-cdk from 2.157.0 to 2.159.1 (#5194) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from a2e3a31 to 22a429f in /docs (#5201) by @dependabot
  • chore(deps): bump actions/download-artifact from 4.1.7 to 4.1.8 (#5203) by @dependabot
  • chore(deps): bump docker/setup-qemu-action from 3.0.0 to 3.2.0 (#5205) by @dependabot
  • chore(deps): bump pypa/gh-action-pypi-publish from 1.10.1 to 1.10.2 (#5202) by @dependabot
  • chore(deps): bump actions/setup-python from 5.1.0 to 5.2.0 (#5204) by @dependabot
  • chore(deps-dev): bump mkdocs-material from 9.5.34 to 9.5.36 (#5210) by @dependabot
  • chore(deps): bump actions/checkout from 4.1.6 to 4.1.7 (#5206) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.264 to 0.1.268 (#5216) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.12.4 to 1.15.0 (#5215) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.17 to 1.35.25 (#5218) by @dependabot
  • chore(deps-dev): bump bandit from 1.7.9 to 1.7.10 (#5214) by @dependabot
  • chore(deps): bump actions/upload-artifact from 4.3.3 to 4.4.0 (#5217) by @dependabot

This release was made possible by the following contributors:

@dependabot, @dependabot[bot], @emmanuel-ferdman, @garysassano, @github-actions, @github-actions[bot], @leandrodamascena, @mw-root and @sthulb

Don't miss a new powertools-lambda-python release

NewReleases is sending notifications on new releases.