Skip to content

Releases: aws-powertools/powertools-lambda-python

v3.3.0

14 Nov 19:42
Compare
Choose a tag to compare

Summary

In this release we added support for the newly released Python 3.13 AWS Lambda managed runtime 🚀.

We’ve also revamped the Parser documentation, and added MutualTLS scheme support when working with OpenAPI schemas and Event handler.

Oh hey, please welcome Ana as our new full-time maintainer - @anafalcao 🎉

🌟 ⭐ Congrats to our new contributor @Sector95 for getting their first PR merged.

Python 3.13 support

You can now use Powertools for AWS Lambda (Python) with the new Python 3.13 runtime in AWS Lambda.

We’ve partnered with the AWS Lambda team for this launch and have been testing our toolkit for the past few weeks to ensure compatibility with no changes from your side.

To start using Powertools for AWS with the new runtime, you can upgrade to this version via PyPi or use the latest version (v4) of our Lambda layers.

Parser documentation

Docs

In this release, we have improved the Parser documentation to include comprehensive examples of using this feature.

image

Kudos to @anafalcao for this work and for her first merged PR 👏

Using MutualTLS in the OpenAPI schema

Docs

Customers now can use MutualTLS security scheme when defining their OpenAPI schema with Event Handler.

mutual

Last but not least, thanks to @xkortex for catching a bug in the Parser utility.

Changes

🌟New features and non-breaking changes

📜 Documentation updates

🐛 Bug and hot fixes

🔧 Maintenance

  • chore(ci): fix imports to build Lambda layer (#5557) by @leandrodamascena
  • chore(ci): Bump CDK version to build layers and fix imports (#5555) by @leandrodamascena
  • feat(runtime): add Python 3.13 support (#5527) by @leandrodamascena
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.279 to 0.1.281 (#5548) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.58 to 1.35.59 (#5549) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.18.4 to 1.19.0 (#5544) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.56 to 1.35.58 (#5540) by @dependabot
  • chore(deps-dev): bump ruff from 0.7.2 to 0.7.3 (#5532) by @dependabot
  • chore(deps): bump actions/setup-python from 5.2.0 to 5.3.0 (#5529) by @dependabot
  • chore(deps): bump actions/checkout from 4.2.0 to 4.2.2 (#5531) by @dependabot
  • chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.165.0a0 to 2.166.0a0 (#5533) by @dependabot
  • chore(deps): bump docker/setup-buildx-action from 2.4.1 to 3.7.1 (#5530) by @dependabot
  • chore(deps): bump docker/setup-qemu-action from 2.1.0 to 3.2.0 (#5528) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.54 to 1.35.56 (#5523) by @dependabot
  • chore(deps-dev): bump aws-cdk-lib from 2.165.0 to 2.166.0 (#5522) by @dependabot
  • chore(deps-dev): bump aws-cdk from 2.165.0 to 2.166.0 (#5520) by @dependabot
  • chore(deps): bump pypa/gh-action-pypi-publish from 1.12.1 to 1.12.2 (#5519) by @dependabot
  • chore(deps): bump pypa/gh-action-pypi-publish from 1.11.0 to 1.12.1 (#5514) by @dependabot
  • chore(deps): bump datadog-lambda from 6.100.0 to 6.101.0 (#5513) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.278 to 0.1.279 (#5512) by @dependabot
  • chore(layers): add pydantic-settings package to v3 Layer (#5516) by @tkasuz
  • chore(deps): bump squidfunk/mkdocs-material from 2c2802b to ce587cb in /docs (#5507) by @dependabot
  • chore(deps-dev): bump mkdocs-material from 9.5.43 to 9.5.44 (#5506) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.18.3 to 1.18.4 (#5501) by @dependabot
  • chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.164.1a0 to 2.165.0a0 (#5500) by @dependabot
  • chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.15 to 3.0.16 (#5499) by @dependabot
  • chore(deps-dev): bump sentry-sdk from 2.17.0 to 2.18.0 (#5502) by @dependabot
  • chore(deps-dev): bump ruff from 0.7.1 to 0.7.2 (#5492) by @dependabot
  • chore(deps): bump datadog-lambda from 6.99.0 to 6.100.0 (#5491) by @dependabot
  • chore(deps-dev): bump aws-cdk from 2.164.1 to 2.165.0 (#5494) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.53 to 1.35.54 (#5493) by @dependabot
  • chore(deps-dev): bump aws-cdk-lib from 2.164.1 to 2.165.0 (#5490) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from 31eb7f7 to 2c2802b in /docs (#5487) by @dependabot
  • chore(deps-dev): bump mkdocs-material from 9.5.42 to 9.5.43 (#5486) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.52 to 1.35.53 (#5485) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.18.2 to 1.18.3 (#5479) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.51 to 1.35.52 (#5478) by @dependabot
  • chore(deps): bump pypa/gh-action-pypi-publish from 1.10.3 to 1.11.0 (#5477) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.49 to 1.35.51 (#5472) by @dependabot
  • chore(deps): bump actions/dependency-review-action from 4.3.5 to 4.4.0 (#5469) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.18.1 to 1.18.2 (#5468) by @dependabot
  • chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.163.1a0 to 2.164.1a0 (#5467) by @dependabot
  • chore(deps-dev): bump aws-cdk from 2.164.0 to 2.164.1 (#5462) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.46 to 1.35.49 (#5460) by @dependabot
  • chore(deps-dev): bump aws-cdk-lib from 2.164.0 to 2.164.1 (#5459) by @dependabot
  • chore(deps-dev): bump ruff from 0.7.0 to 0.7.1 (#5451) by @dependabot
  • chore(deps-dev): bump aws-cdk-lib from 2.163.1 to 2.164.0 (#5453) by @dependabot
  • chore(deps-dev): bump aws-cdk from 2.163.1 to 2.164.0 (#5452) by @dependabot
  • chore(deps): bump redis from 5.1.1 to 5.2.0 (#5454) by @dependabot
  • chore(deps): bump actions/setup-python from 5.2.0 to 5.3.0 (#5449) by @dependabot
  • chore(deps): bump actions/setup-node from 4.0.4 to 4.1.0 (#5450) by @dependabot
  • chore(ci): bump minimum required pydantic version (#5446) by @leandrodamascena
  • chore(deps-dev): bump mypy from 1.11.2 to 1.13.0 (#5440) by @dependabot
  • chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.162.1a0 to 2.163.1a0 (#5441) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.277 to 0.1.278 (#5439) by @dependabot
  • chore(deps): bump actions/checkout from 4.2.1 to 4.2.2 (#5438) by @dependabot
  • chore(deps-dev): bump aws-cdk-lib from 2.162.1 to 2.163.1 (#5429) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.45 to 1.35.46 (#5430) by @dependabot
  • chore(deps-dev): bump aws-cdk from 2.162.1 to 2.163.1 (#5432) by @dependabot
  • chore(deps): bump actions/dependency-review-action from 4.3.4 to 4.3.5 (#5431) by @dependabot
  • chore(deps-dev): bump xenon from 0.9.1 to 0.9.3 (#5428) by @dependabot

This release was made possible by the following contributors:

@Sector95, @anafalcao, @dependabot, @dependabot[bot], @github-actions, @github-actions[bot], @leandrodamascena, @sthulb and @tkasuz

v3.2.0

22 Oct 13:06
Compare
Choose a tag to compare

Summary

We are thrilled to announce that Powertools for AWS Lambda (Python) now offers AWS Lambda layers in the AWS GovCloud (US) regions.

🌟 ⭐ Thanks to @SimonBFrank's amazing work, our Logger utility is now thread-safe when handling extra keys.

New AWS GovCloud (US) Lambda Layer ARNs

You can now use Powertools for AWS Lambda (Python) Lambda layers in the AWS GovCloud (US) regions, enhancing customer experience by making our pre-packaged Lambda layers available in this AWS partition.

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:

AWS GovCloud (us-gov-east-1)

Architecture Layer ARN
x86_64 arn:aws-us-gov:lambda:us-gov-east-1:165087284144:layer:AWSLambdaPowertoolsPythonV3-{python_version}-x86_64:{version}
ARM arn:aws-us-gov:lambda:us-gov-east-1:165087284144:layer:AWSLambdaPowertoolsPythonV3-{python_version}-arm64:{version}

AWS GovCloud (us-gov-west-1)

Architecture Layer ARN
x86_64 arn:aws-us-gov:lambda:us-gov-west-1:165093116878:layer:AWSLambdaPowertoolsPythonV3-{python_version}-x86_64:{version}
ARM arn:aws-us-gov:lambda:us-gov-west-1:165093116878:layer:AWSLambdaPowertoolsPythonV3-{python_version}-arm64:{version}

New thread-safe methods when working with extra keys in the Logger utility

Docs

Before this release, customers might have encountered issues when using append_keys between thread executions.

You can now use new thread-safe methods for managing extra keys in the Logger utility, ensuring safe and efficient logging in concurrent environments.

threads

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-dev): bump cfn-lint from 1.17.2 to 1.18.1 (#5423) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.44 to 1.35.45 (#5421) by @dependabot
  • chore(deps-dev): bump mkdocs-material from 9.5.41 to 9.5.42 (#5420) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.275 to 0.1.277 (#5419) by @dependabot
  • chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.14 to 3.0.15 (#5418) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from 0d4e687 to 31eb7f7 in /docs (#5417) by @dependabot
  • chore(ci): Add dump of govcloud layer info in verify step (#5415) by @sthulb
  • chore(deps-dev): bump cfn-lint from 1.17.1 to 1.17.2 (#5408) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.43 to 1.35.44 (#5407) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.274 to 0.1.275 (#5406) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.16.1 to 1.17.1 (#5404) by @dependabot
  • chore(deps-dev): bump sentry-sdk from 2.16.0 to 2.17.0 (#5400) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.42 to 1.35.43 (#5402) by @dependabot
  • chore(deps-dev): bump ruff from 0.6.9 to 0.7.0 (#5403) by @dependabot
  • chore(deps-dev): bump mkdocs-material from 9.5.40 to 9.5.41 (#5393) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.41 to 1.35.42 (#5397) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.273 to 0.1.274 (#5394) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.39 to 1.35.41 (#5392) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from f9cb76d to 0d4e687 in /docs (#5395) by @dependabot
  • chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.161.1a0 to 2.162.1a0 (#5386) by @dependabot
  • chore(docs): remove layer callout from data masking docs (#5377) by @dreamorosi
  • chore(deps-dev): bump aws-cdk-lib from 2.161.1 to 2.162.1 (#5371) by @dependabot
  • chore(deps): bump actions/upload-artifact from 4.4.0 to 4.4.3 (#5373) by @dependabot
  • chore(deps-dev): bump aws-cdk from 2.161.1 to 2.162.1 (#5372) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.38 to 1.35.39 (#5370) by @dependabot
  • chore(deps): bump jsonpath-ng from 1.6.1 to 1.7.0 (#5369) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.16.0 to 1.16.1 (#5363) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.37 to 1.35.38 (#5364) by @dependabot
  • chore(deps-dev): bump mkdocs-material from 9.5.39 to 9.5.40 (#5365) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from 8e8b333 to f9cb76d in /docs (#5366) by @dependabot
  • chore(deps): bump actions/upload-artifact from 4.4.1 to 4.4.3 (#5357) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.36 to 1.35.37 (#5356) by @dependabot
  • chore(deps-dev): bump nox from 2024.4.15 to 2024.10.9 (#5355) by @dependabot
  • chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.161.0a0 to 2.161.1a0 (#5349) by @dependabot
  • chore(deps-dev): bump boto3-stubs from 1.35.35 to 1.35.36 (#5350) by @dependabot
  • chore(deps-dev): bump sentry-sdk from 2.15.0 to 2.16.0 (#5348) by @dependabot

This release was made possible by the following contributors:

@SimonBFrank, @dependabot, @dependabot[bot], @dreamorosi, @github-actions, @github-actions[bot], @leandrodamascena and @sthulb

v3.1.0

08 Oct 13:29
Compare
Choose a tag to compare

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...
Read more

v3.0.0

23 Sep 14:11
Compare
Choose a tag to compare

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}
x86_64 3.12 arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-x86:{version}
arm64 3.8 arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python38-arm64:{version}
arm64 3.9 arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python39-arm64:{version}
arm64 3.10 arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python310-arm64:{version}
arm64 3.11 arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python311-arm64:{version}
arm64 3.12 arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV3-python312-arm64:{version}

Event Source Data Classes default values

We have modified the Event Source Data classes so optional dictionaries and lists now return empty dictionaries or lists instead of None. This improvement simplifies your code by eliminating the need for conditional checks when accessing these fields, while maintaining backward compatibility with previous implementations.

data_class

Event Handler: headers are case-insensitive

According to the HTTP RFC, HTTP headers must be case-insensitive. As a result, we have deprecated the get_header_value function to align with this standard. Instead, we recommend using app.current_event.headers.get to access header values directly.

Consequently, the case_sensitive parameter in this function no longer has any effect, as we now ensure consistent casing by normalizing headers for you. This function will be removed in a future release, and we encourage you to adopt the new method to access header values.

event_handler

Backwards incompatible changes

Area Change Code Change Required
Pydantic We have removed support for Pydantic v1 No
Parser We have eplaced 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 Headers are case-insensitive, and 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

This release was made possible by the following contributors:

@ericbn, @github-actions, @github-actions[bot], @sthulb, and @leandrodamascena

v2.43.1

13 Aug 14:00
Compare
Choose a tag to compare

Summary

The regression issue caused by PR #4863 has been resolved in this patch release. The issue occurred when working with zero numbers in the Data Source utility's DynamoDBStreamEvent class.

Changes

🌟New features and non-breaking changes

🐛 Bug and hot fixes

  • fix(event_source): fix regression when working with zero numbers in DynamoDBStreamEvent (#4932) by @leandrodamascena

🔧 Maintenance

  • chore(deps): bump datadog-lambda from 6.97.0 to 6.98.0 (#4938) by @dependabot
  • chore(deps-dev): bump mypy-boto3-s3 from 1.34.138 to 1.34.158 in the boto-typing group (#4936) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.9.6 to 1.9.7 (#4923) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.238 to 0.1.242 (#4922) by @dependabot
  • chore(deps-dev): bump mypy-boto3-ssm from 1.34.132 to 1.34.158 in the boto-typing group (#4921) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.9.5 to 1.9.6 (#4916) by @dependabot
  • chore(deps-dev): bump ruff from 0.5.6 to 0.5.7 (#4918) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.234 to 0.1.238 (#4917) by @dependabot

This release was made possible by the following contributors:

@dependabot, @dependabot[bot], @github-actions, @github-actions[bot], @leandrodamascena, @sthulb and @tlinhart

v2.43.0

08 Aug 14:44
Compare
Choose a tag to compare

Summary

This release improves the Validation utility, which now returns the validated data, including default values.

We have improved the Metrics utility, which now can emit metrics using the None unit. We have also fixed a bug in Event Source for Amazon DynamoDB Streams when using numbers with more than 38 digits.

🌟 ⭐ A big thank you to our new contributors: @dracozombie19, and @avonengel

Retrieving validated JSON from validate function

Docs

The validate function now returns the validated JSON, including any default values.

validate1

Last but least, thank to @miikka, @aminalaee and @ethantkoenig for raising issues.

Changes

  • refactor(tracer): make capture_lambda_handler type more generic (#4796) by @aminalaee

🌟New features and non-breaking changes

  • feat(metrics): add unit None for CloudWatch EMF Metrics (#4904) by @sthulb
  • feat(validation): returns output from validate function (#4839) by @dracozombie19

📜 Documentation updates

🐛 Bug and hot fixes

  • fix(data_class): ensure DynamoDBStreamEvent conforms to decimal limits (#4863) by @sthulb

🔧 Maintenance

  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.233 to 0.1.234 (#4909) by @dependabot
  • chore(deps): bump actions/upload-artifact from 4.3.5 to 4.3.6 (#4901) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.231 to 0.1.233 (#4900) by @dependabot
  • chore(deps-dev): bump types-redis from 4.6.0.20240726 to 4.6.0.20240806 (#4899) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.9.3 to 1.9.5 (#4890) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.230 to 0.1.231 (#4891) by @dependabot
  • chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.150.0a0 to 2.151.0a0 (#4889) by @dependabot
  • chore(deps-dev): bump coverage from 7.6.0 to 7.6.1 (#4888) by @dependabot
  • chore(deps): bump golang.org/x/sync from 0.7.0 to 0.8.0 in /layer/scripts/layer-balancer in the layer-balancer group (#4892) by @dependabot
  • refactor(test): make CORS test consistent with expected behavior (#4882) by @Wurstnase
  • chore(deps-dev): bump mypy-boto3-cloudwatch from 1.34.83 to 1.34.153 in the boto-typing group (#4887) by @dependabot
  • chore(deps-dev): bump black from 24.4.2 to 24.8.0 (#4873) by @dependabot
  • chore(deps-dev): bump aws-cdk from 2.150.0 to 2.151.0 (#4872) by @dependabot
  • chore(deps-dev): bump ruff from 0.5.5 to 0.5.6 (#4874) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.228 to 0.1.230 (#4876) by @dependabot
  • chore(deps-dev): bump aws-cdk-lib from 2.150.0 to 2.151.0 (#4875) by @dependabot
  • chore(deps): bump actions/upload-artifact from 4.3.4 to 4.3.5 (#4871) by @dependabot
  • chore(deps-dev): bump mkdocs-material from 9.5.30 to 9.5.31 (#4877) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from 257eca8 to 9919d6e in /docs (#4878) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.9.1 to 1.9.3 (#4866) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.224 to 0.1.228 (#4867) by @dependabot
  • chore(deps-dev): bump sentry-sdk from 2.11.0 to 2.12.0 (#4861) by @dependabot
  • chore(deps): bump redis from 5.0.7 to 5.0.8 (#4854) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.223 to 0.1.224 (#4855) by @dependabot
  • chore(deps-dev): bump mypy-boto3-logs from 1.34.66 to 1.34.151 in the boto-typing group (#4853) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.8.2 to 1.9.1 (#4851) by @dependabot
  • chore(deps): bump docker/setup-buildx-action from 3.5.0 to 3.6.1 (#4844) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.222 to 0.1.223 (#4843) by @dependabot
  • chore(maintenance): add Banxware customer refernece (#4841) by @dreamorosi
  • chore(deps-dev): bump pytest from 8.3.1 to 8.3.2 (#4824) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.219 to 0.1.222 (#4836) by @dependabot
  • chore(deps): bump ossf/scorecard-action from 2.3.3 to 2.4.0 (#4829) by @dependabot
  • chore(deps-dev): bump types-redis from 4.6.0.20240425 to 4.6.0.20240726 (#4831) by @dependabot
  • chore(deps-dev): bump ruff from 0.5.4 to 0.5.5 (#4823) by @dependabot

This release was made possible by the following contributors:

@Wurstnase, @aminalaee, @avonengel, @dependabot, @dependabot[bot], @dracozombie19, @dreamorosi, @github-actions, @github-actions[bot], @leandrodamascena and @sthulb

v2.42.0

25 Jul 13:48
Compare
Choose a tag to compare

Summary

This release adds support for OpenAPI extensions to help you describe functionality beyond the OpenAPI Spec.

We also made tons of improvements in the Idempotency docs based on customers feedback on navigation, examples, and limitations.

🌟 ⭐ Huge thanks to everyone who helped in this release, specially @bertpl for crushing a bug in the Idempotency feature.

Working with OpenAPI extensions

Docs

You can now define extensions using the openapi_extensions parameter. This unblocks a common use case in defining Amazon API Gateway extensions like Authorizers, Integrations, etc.

openapi_extension

Idempotency revamped docs

Based on customer feedback at the Serverless Days ANZ, we improved all code snippets, made navigation more granular, and split DynamoDB vs Redis persistence storage (Infra vs Runtime).

We also made it more explicit everywhere that Idempotency is bound to a particular time window (1h by default) that you can adjust.

image

Changes

🌟New features and non-breaking changes

📜 Documentation updates

🐛 Bug and hot fixes

  • fix(idempotency): ensure in_progress_expiration field is set on Lambda timeout. (#4773) by @sthulb

🔧 Maintenance

  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.212 to 0.1.219 (#4817) by @dependabot
  • chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.148.1a0 to 2.150.0a0 (#4813) by @dependabot
  • chore(deps-dev): bump mkdocs-material from 9.5.29 to 9.5.30 (#4807) by @dependabot
  • chore(deps-dev): bump sentry-sdk from 2.10.0 to 2.11.0 (#4815) by @dependabot
  • chore(deps-dev): bump mypy-boto3-dynamodb from 1.34.131 to 1.34.148 in the boto-typing group (#4812) by @dependabot
  • chore(deps-dev): bump aws-cdk from 2.149.0 to 2.150.0 (#4805) by @dependabot
  • chore(docs): Add lambda layer policy to versioning docs (#4811) by @hjgraca
  • chore(deps-dev): bump aws-cdk-lib from 2.148.1 to 2.150.0 (#4806) by @dependabot
  • chore(deps-dev): bump pytest from 8.2.2 to 8.3.1 (#4799) by @dependabot
  • chore(deps): bump docker/setup-qemu-action from 3.1.0 to 3.2.0 (#4800) by @dependabot
  • chore(deps): bump docker/setup-buildx-action from 3.4.0 to 3.5.0 (#4801) by @dependabot
  • chore(deps-dev): bump ruff from 0.5.3 to 0.5.4 (#4798) by @dependabot
  • chore(logger): use package logger over source logger to reduce noise (#4793) by @heitorlessa
  • chore(deps-dev): bump cfn-lint from 1.8.1 to 1.8.2 (#4788) by @dependabot
  • chore(deps-dev): bump mypy-boto3-secretsmanager from 1.34.128 to 1.34.145 in the boto-typing group (#4787) by @dependabot
  • chore(deps): bump aws-actions/closed-issue-message from 8b6324312193476beecf11f8e8539d73a3553bf4 to 80edfc24bdf1283400eb04d20a8a605ae8bf7d48 (#4786) by @dependabot
  • chore(deps-dev): bump ruff from 0.5.2 to 0.5.3 (#4781) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.6.1 to 1.8.1 (#4780) by @dependabot
  • chore(deps-dev): bump pytest-asyncio from 0.23.7 to 0.23.8 (#4776) by @dependabot
  • chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.27.26 to 1.27.27 in /layer/scripts/layer-balancer in the layer-balancer group (#4779) by @dependabot
  • chore(deps): bump datadog-lambda from 6.96.0 to 6.97.0 (#4770) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.211 to 0.1.212 (#4769) by @dependabot
  • chore(deps-dev): bump mkdocs-material from 9.5.28 to 9.5.29 (#4764) by @dependabot
  • chore(deps-dev): bump aws-cdk from 2.148.0 to 2.149.0 (#4765) by @dependabot
  • chore(deps-dev): bump ruff from 0.5.1 to 0.5.2 (#4762) by @dependabot
  • chore(deps-dev): bump sentry-sdk from 2.9.0 to 2.10.0 (#4763) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.207 to 0.1.211 (#4760) by @dependabot
  • chore(deps): bump actions/dependency-review-action from 4.3.3 to 4.3.4 (#4753) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.6.0 to 1.6.1 (#4751) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.5.3 to 1.6.0 (#4747) by @dependabot
  • chore(deps-dev): bump coverage from 7.5.4 to 7.6.0 (#4746) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.206 to 0.1.207 (#4748) by @dependabot
  • chore(deps): bump the layer-balancer group in /layer/scripts/layer-balancer with 3 updates (#4745) by @dependabot

This release was made possible by the following contributors:

@dependabot, @dependabot[bot], @github-actions, @github-actions[bot], @heitorlessa, @hjgraca, @leandrodamascena and @sthulb

v2.41.0

11 Jul 13:22
Compare
Choose a tag to compare

Summary

This release enhances the Batch Processing feature, which you can now customize to not throw an error when the entire batch of items fails to process.

We have also added three new Pydantic models to our Parser feature to work with authorizers in Amazon API Gateway.

Thanks to @adriantomas, customers can bring their own boto3 client when using Feature Flags feature.

🌟 ⭐ A big thank you to everyone who helped make this release.

Working with full batch failures

Docs

You can now set the raise_on_entire_batch_failure option to False to prevent the Batch Processing utility from throwing a BatchProcessingError, when all records in a batch fail to process. This is useful when working with functions that handle batches with a small number of records, or when you use errors as a flow control mechanism.

batch_process

New Parser models

Docs

You can now use the new Pydantic models to validate payloads originating from authorization events in REST and HTTP APIs.

parser

Here are all the modules we've added:

  • ApiGatewayAuthorizerToken - For REST API Authorizer events using Token
  • ApiGatewayAuthorizerRequest - For REST API Authorizer events using Request
  • ApiGatewayAuthorizerRequestV2 - For HTTP API Authorizer events using Request

Customizing boto3 client configuration for Feature Flags

Docs

You can now bring your own boto3 client instance when using Feature Flags. This is ideal when you want to reuse or customize the appconfigdata client.

appconfig

Last but not least, thanks to @Wurstnase for helping us to fix a bug when using CORS in the Event Handler feature.

Changes

🌟New features and non-breaking changes

  • feat(feature_flags): allow customers to bring their own boto3 client and session (#4717) by @adriantomas
  • feat(batch): add option to not raise BatchProcessingError exception when the entire batch fails (#4719) by @leandrodamascena
  • feat(parser): add support for API Gateway Lambda authorizer events (#4718) by @leandrodamascena

📜 Documentation updates

🐛 Bug and hot fixes

  • fix(event_handler): make the max_age attribute comply with RFC specification (#4731) by @leandrodamascena
  • fix(event_handler): disable allow-credentials header when origin allow_origin is * (#4638) by @sthulb
  • fix(event_handler): convert null body to empty string in ALBResolver to avoid HTTP 502 (#4683) by @heitorlessa
  • fix(event_handler): custom serializer recursive values when using data validation (#4664) by @heitorlessa
  • fix(event_handler): current_event regression AppSyncResolver Router (#4652) by @leandrodamascena

🔧 Maintenance

  • chore(layers): downgrade aws cdk to 2.145.0 (#4739) by @leandrodamascena
  • chore(deps-dev): bump sentry-sdk from 2.8.0 to 2.9.0 (#4735) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.5.2 to 1.5.3 (#4734) by @dependabot
  • chore(deps): bump actions/setup-python from 5.1.0 to 5.1.1 (#4732) by @dependabot
  • chore(deps): bump the layer-balancer group in /layer/scripts/layer-balancer with 3 updates (#4733) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.5.1 to 1.5.2 (#4724) by @dependabot
  • chore(deps): bump actions/setup-node from 4.0.2 to 4.0.3 (#4725) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.202 to 0.1.205 (#4723) by @dependabot
  • chore(deps-dev): bump zipp from 3.17.0 to 3.19.1 in /layer (#4721) by @dependabot
  • chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.147.3a0 to 2.148.0a0 (#4722) by @dependabot
  • chore(deps): bump zipp from 3.17.0 to 3.19.1 in /docs (#4720) by @dependabot
  • chore(deps-dev): bump aws-cdk-lib from 2.147.3 to 2.148.0 (#4710) by @dependabot
  • chore(deps-dev): bump aws-cdk from 2.147.3 to 2.148.0 (#4708) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.5.0 to 1.5.1 (#4711) by @dependabot
  • chore(deps-dev): bump sentry-sdk from 2.7.1 to 2.8.0 (#4712) by @dependabot
  • chore(deps): bump certifi from 2024.6.2 to 2024.7.4 (#4700) by @dependabot
  • chore(deps-dev): bump ruff from 0.5.0 to 0.5.1 (#4697) by @dependabot
  • chore(deps): bump actions/upload-artifact from 4.3.3 to 4.3.4 (#4698) by @dependabot
  • chore(deps): bump actions/download-artifact from 4.1.7 to 4.1.8 (#4699) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.201 to 0.1.202 (#4696) by @dependabot
  • chore(deps): bump docker/setup-buildx-action from 3.3.0 to 3.4.0 (#4693) by @dependabot
  • chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.147.2a0 to 2.147.3a0 (#4686) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.200 to 0.1.201 (#4687) by @dependabot
  • chore(deps): bump docker/setup-qemu-action from 3.0.0 to 3.1.0 (#4685) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.4.2 to 1.5.0 (#4675) by @dependabot
  • chore(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.27.23 to 1.27.24 in /layer/scripts/layer-balancer in the layer-balancer group (#4684) by @dependabot
  • chore: Add token to codecov action (#4682) by @hjgraca
  • chore(deps-dev): bump aws-cdk-lib from 2.147.2 to 2.147.3 (#4674) by @dependabot
  • chore(deps-dev): bump mkdocs-material from 9.5.27 to 9.5.28 (#4676) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.199 to 0.1.200 (#4677) by @dependabot
  • chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.9 to 3.0.10 (#4678) by @dependabot
  • chore(deps-dev): bump aws-cdk from 2.147.2 to 2.147.3 (#4672) by @dependabot
  • chore(deps-dev): bump mypy-boto3-s3 from 1.34.120 to 1.34.138 in the boto-typing group (#4673) by @dependabot
  • chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.198 to 0.1.199 (#4668) by @dependabot
  • chore(deps-dev): bump aws-cdk-aws-lambda-python-alpha from 2.147.1a0 to 2.147.2a0 (#4667) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.4.1 to 1.4.2 (#4660) by @dependabot
  • chore(deps-dev): bump aws-cdk-lib from 2.147.1 to 2.147.2 (#4661) by @dependabot
  • chore(deps): bump the layer-balancer group in /layer/scripts/layer-balancer with 3 updates (#4659) by @dependabot
  • chore(deps-dev): bump aws-cdk from 2.147.1 to 2.147.2 (#4657) by @dependabot
  • chore(deps-dev): bump ruff from 0.4.10 to 0.5.0 (#4644) by @dependabot
  • chore(deps-dev): bump cfn-lint from 1.3.7 to 1.4.1 (#4646) by @dependabot
  • chore(deps-dev): bump sentry-sdk from 2.7.0 to 2.7.1 (#4645) by @dependabot

This release was made possible by the following contributors:

@adriantomas, @dependabot, @dependabot[bot], @github-actions, @github-actions[bot], @heitorlessa, @hjgraca, @leandrodamascena, @ran-isenberg and @sthulb

v2.40.0

27 Jun 15:20
Compare
Choose a tag to compare

Summary

We're excited to announce Batch resolvers in GraphQL Event Handler to tackle the infamous N+1 problem in GraphQL 💪, making it easier to work with batching in AWS AppSync.

Thanks to @danieljnchen, the validation utility now supports referencing internal schemas within your JSON files. 🌟

🌟 ⭐ A big thank you to our new contributors: @scampbell5, @matteofigus, and @danieljnchen.

Batch resolvers in Event Handler GraphQL

Docs

You can now use a batch resolver to handle batch requests coming from AWS AppSync. This is useful when AWS AppSync has batching enabled for Lambda Resolvers as it allows the aggregation of as many requests as possible before invoking your AWS Lambda function, effectively solving the N+1 problem in GraphQL.

batch_resolver

Validation feature now supports custom handlers

Docs

You can now control JSON schema references with custom handlers. This is useful when you might want to optimize caching, reducing HTTP calls, or fetching them from non-HTTP endpoints.

validation

Last but not least, @scampbell5 helps us fix the types for partition and offset in the KafkaEventRecord Event Source Data Class.

Changes

🌟New features and non-breaking changes

  • feat(event-handler): add appsync batch resolvers (#1998) by @mploski
  • feat(validation): support JSON Schema referencing in validation utils (#4508) by @danieljnchen

📜 Documentation updates

🐛 Bug and hot fixes

  • fix(event_sources): change partition and offset field types in KafkaEventRecord (#4515) by @scampbell5

🔧 Maintenance

This release was made possible by the following contributors:

@danieljnchen, @dependabot, @dependabot[bot], @github-actions, @github-actions[bot], @heitorlessa, @leandrodamascena, @matteofigus, @mploski, @ran-isenberg and @scampbell5

v2.39.1

13 Jun 15:45
Compare
Choose a tag to compare

Summary

The regression issue caused by PR #4421 is resolved in this patch release. The issue occurred due to static typing importing Pydantic, as it went undetected in our pipeline and code review.

To prevent from happening again, we will introduce dynamic tests for all optional dependencies. We will pause new releases until that is implemented and verified. For further improvement, we will look into making daily pre-releases to help create more complex canary tests.

Changes

🐛 Bug and hot fixes

This release was made possible by the following contributors:

@github-actions, @github-actions[bot] and @leandrodamascena