github aws-powertools/powertools-lambda-python v1.26.7

latest releases: v3.3.0, v3.2.0, v3.1.0...
2 years ago

Summary

This release adds a change to the idempotency utility, expiring in-progress executions if the Lambda function times out halfway through.

The new feature requires no code changes. However, if you're using just the idempotent_function decorator, you will want to register the Lambda context on your handler to take advantage of this feature:

To prevent against extended failed retries when a Lambda function times out, Powertools now calculates and includes the remaining invocation available time as part of the idempotency record. If a second invocation happens after this timestamp, and the record is marked as INPROGRESS, we will execute the invocation again as if it was in the EXPIRED state (e.g, expire_seconds field elapsed).

We also enabled static analysis (mypy) on the new statically typed documentation snippets - big thanks to @VictorCovalski for spotting one issue in Event Handler that later led to 50 other fixes.

Oh! Did I also tell you we’ve got a new full time maintainer? Big welcome to Ruben 😉 https://twitter.com/rubenfonseca

Changes

🌟New features and non-breaking changes

  • feat(idempotency): handle lambda timeout scenarios for INPROGRESS records (#1387) by @rubenfonseca

📜 Documentation updates

🐛 Bug and hot fixes

  • fix(event_handlers): ImportError when importing Response from top-level event_handler (#1388) by @VictorCovalski

🔧 Maintenance

This release was made possible by the following contributors:

@VictorCovalski, @dependabot, @dependabot[bot], @heitorlessa, @rubenfonseca and Release bot

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

NewReleases is sending notifications on new releases.