Skip to content

v2.32.0

Compare
Choose a tag to compare
@github-actions github-actions released this 22 Jan 09:42
· 476 commits to refs/heads/develop since this release

Summary

We're excited to introduce two significant new features in our Idempotency utility:

  • Support for Redis as an Idempotency persistent storage layer
  • DynamoDB storage layer is now faster and cheaper by leveraging conditional writes

We also made enhancements to our OpenAPI and Event Sources utilities, and fixed some bugs!

⭐ Huge thanks to our new contributors: @sbailliez, @Thomas-McKanna, and @dastra!

Redis as an Idempotency persistent storage layer

Docs

You can now seamlessly switch between DynamoDB and Redis as a persistence storage layer. This allows you to leverage the Idempotency utility in previously unavailable scenarios, such as handling responses over 400kb.

We remain committed to making efforts to introduce new backends, and we would love to hear from you on which backend we should prioritize next!

redis_idempotency2

⭐ ⭐ Huge thanks to @roger-zhangg for your help!

Optimized DynamoDB storage layer with conditional writes

AWS has recently introduced support for ReturnValuesOnConditionCheckFailure, a feature designed to streamline conditional write operations and reducing costs in Amazon DynamoDB. With this enhancement, Powertools for AWS Lambda now optimistically attempts to write items to DynamoDB. If the item already exists, it seamlessly returns it from DynamoDB without requiring an additional operation.

S3 Batch Operations Event Source

Docs

S3 Batch Operations are now supported on the Event Source utility. When using S3 Batch Operations, a Lambda function can be used to execute various operations. For each task, you can choose to either:

A) Return the task as a success (default)
B) Return the task as temporarily failed (e.g., due to a timeout when connecting to other services) and enable automatic retries.
C) Return the task as permanently failed, resulting in job failure.

This example illustrates how you can return different status based on your specific execution logic.

s3_batch2

OpenAPI response models

Docs

You can now define additional response models within the OpenAPI schema utility, allowing you to leverage existing Pydantic data models and classes.

response

Last but not least, you can now effortlessly download the OpenAPI schema file directly from the SwaggerUI.

Changes

🌟New features and non-breaking changes

📜 Documentation updates

  • feat(idempotency): leverage new DynamoDB Failed conditional writes behavior with ReturnValuesOnConditionCheckFailure (#3446) by @dastra
  • feat(event_source): Add support for S3 batch operations (#3572) by @sbailliez
  • feat(event_handler): add support for additional response models in OpenAPI schema (#3591) by @rubenfonseca
  • chore(deps): bump squidfunk/mkdocs-material from 2f29d71 to 58eef6c in /docs (#3633) by @dependabot
  • docs(homepage): add banner about Python 3.7 deprecation (#3618) by @leandrodamascena
  • chore(deps): bump jinja2 from 3.1.2 to 3.1.3 in /docs (#3620) by @dependabot
  • feat(idempotency): adding redis as idempotency backend (#2567) by @roger-zhangg
  • chore(deps): bump gitpython from 3.1.37 to 3.1.41 in /docs (#3610) by @dependabot
  • refactor(event-handler): Inject CSS and JS files into SwaggerUI route when no custom CDN is used. (#3562) by @leandrodamascena
  • feat(event_handler): add support to download OpenAPI spec file (#3571) by @Thomas-McKanna
  • docs(i-made-this): added new article on how to create a serverless API with CDK and Powertools (#3605) by @leandrodamascena

🔧 Maintenance

  • chore(deps-dev): bump ruff from 0.1.13 to 0.1.14 (#3656) by @dependabot
  • chore(deps): bump pydantic from 1.10.13 to 1.10.14 (#3655) by @dependabot
  • feat(idempotency): leverage new DynamoDB Failed conditional writes behavior with ReturnValuesOnConditionCheckFailure (#3446) by @dastra
  • chore(deps): bump the layer-balancer group in /layer/scripts/layer-balancer with 1 update (#3649) by @dependabot
  • chore(deps-dev): bump aws-cdk from 2.121.1 to 2.122.0 (#3648) by @dependabot
  • chore(deps): bump the layer-balancer group in /layer/scripts/layer-balancer with 1 update (#3639) by @dependabot
  • chore(deps): bump squidfunk/mkdocs-material from 2f29d71 to 58eef6c in /docs (#3633) by @dependabot
  • chore(deps-dev): bump aws-cdk from 2.120.0 to 2.121.1 (#3634) by @dependabot
  • chore(ci): update boto3 library version to 1.26.164+ (#3632) by @leandrodamascena
  • chore(deps-dev): bump ruff from 0.1.11 to 0.1.13 (#3625) by @dependabot
  • chore(deps-dev): bump aws-cdk from 2.118.0 to 2.120.0 (#3627) by @dependabot
  • chore(deps): bump jinja2 from 3.1.2 to 3.1.3 in /docs (#3620) by @dependabot
  • chore(deps-dev): bump jinja2 from 3.1.2 to 3.1.3 (#3619) by @dependabot
  • chore(deps-dev): bump sentry-sdk from 1.39.1 to 1.39.2 (#3614) by @dependabot
  • chore(deps): bump redis from 4.6.0 to 5.0.1 (#3613) by @dependabot
  • feat(idempotency): adding redis as idempotency backend (#2567) by @roger-zhangg
  • chore(deps-dev): bump gitpython from 3.1.40 to 3.1.41 (#3611) by @dependabot
  • chore(deps): bump gitpython from 3.1.37 to 3.1.41 in /docs (#3610) by @dependabot
  • chore(deps-dev): bump cfn-lint from 0.83.7 to 0.83.8 (#3603) by @dependabot

This release was made possible by the following contributors:

@Thomas-McKanna, @dastra, @dependabot, @dependabot[bot], @github-actions, @github-actions[bot], @leandrodamascena, @roger-zhangg, @rubenfonseca and @sbailliez