pypi aws-lambda-powertools 1.11.0
v1.11.0

latest releases: 2.37.0, 2.36.0, 2.35.1...
3 years ago

Changes

This is our most special release this quarter, as we are happy to announce:

  1. Up to 75% performance improvement for customers not using Tracer utility due to lazy loading
  2. Up to 40% performance improvement for customers using Metrics as large operations are now <1ms
  3. Brand new Idempotency utility for safely retrying operations that have side-effects, one of the most awaited feature since we've gone GA

Performance improvements

Tracer effect on import time flame graph before and after initial round of optimizations

image

image

Warm execution logging, serializing, and validating 99 Metrics to CloudWatch asynchronously on the lowest Lambda fn memory (128) after all optimizations

image

New idempotency utility

Initially led by @igorlg RFC on Idempotency, and its implementation that started in mid December by @cakepietoast, with a gigantic effort by both @cakepietoast and @michaelbrewer on UX and correctness following Amazon Builder's Library and Stripe designs -- We now have it in Beta as part of this release.

Given the amount of serious work for this utility and its logic, we've decided it'd be best to launch as Beta as we'd like feedback on UX before we release as stable.

Key features at launch:

  • Use DynamoDB as a persistence layer for state including Bring Your Own Persistence Store Layer
  • Optional in-memory caching, idempotency state auto-expiration for cost reasons
  • JMESPath support to select a subset of your payload to serialize and hash as idempotency key
  • Payload validation in case we shouldn't return the previous result in case X parameter has changed in your request
  • Last but not least, the documentation is super comprehensive with over 600 lines of content.

We truly hope you enjoy it :-)

image

image

🌟New features and non-breaking changes

  • feat(data-classes): Add connect contact flow event (#304) by @Sordie
  • feat(idempotency): Add raise_on_no_idempotency_key flag (#297) by @michaelbrewer
  • feat: Idempotency helper utility (#245) by @cakepietoast

🌟 Minor Changes

  • refactor(idempotent): Change UX to use a config class for non-persistence related features (#306) by @michaelbrewer
  • refactor(metrics): optimize validation and serialization (#307) by @heitorlessa
  • feat(idempotent): Add support for jmespath_options (#302) by @michaelbrewer
  • fix(core): import time latency by lazily loading high level modules (#301) by @heitorlessa

πŸ“œ Documentation updates

πŸ› Bug and hot fixes

  • test(general): Add some missing code coverage (#296) by @michaelbrewer
  • feat(idempotency): Fix KeyError when local_cache is True and an error is raised in the lambda handler (#300) by @michaelbrewer
  • fix: correct behaviour to avoid caching "INPROGRESS" records (#295) by @cakepietoast

This release was made possible by the following contributors:

@Sordie, @cakepietoast, @heitorlessa and @michaelbrewer

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

NewReleases is sending notifications on new releases.