pypi aws-lambda-powertools 1.6.0
v1.6.0

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

Changes

Data_classes utility

image

New utility to easily describe event schema of popular event sources, including helper methods to access common objects (s3 bucket key) and data deserialization (records from Kinesis, CloudWatch Logs, etc).

Huge prop to @michaelbrewer for the contribution, and @cakepietoast for the comprehensive docs with examples.

JSON Schema validation utility

image

New utility to quickly validate inbound events and responses using JSON Schema. It also supports unwrapping events using JMESPath expressions, so you can validate only the payload or key that interests you.

Oh, before I forget! This also includes custom JMESPath functions for de-serializing JSON Strings, base64, and ZIP compressed data before applying validation too πŸ₯°

Metrics with multiple values

Metrics utility now support adding multiple values to the same metric - This was updated in CloudWatch EMF, and Powertools happily support that too ;) - Thanks to @Dunedan for spotting that

Minor doc changes

We added a Testing your code section for Logger and Metrics for customers like @patrickwerz who had difficulties to do unit testing their code with Powertools - Pytest fixture and examples are now provided!

We also increased the content width to ease reading more elaborate sections, and gives us room to start tinkering with a Tutorial/Guide section in coming releases \ o /

🌟New features and non-breaking changes

  • improv: disable tracer when using the Chalice CLI (#172) by @jamesls
  • feat(trigger): data class and helper functions for lambda trigger events (#159) by @michaelbrewer
  • feat: emf multiple metric values (#167) by @cakepietoast
  • feat: simple JSON Schema validator utility (#153) by @heitorlessa

πŸ“œ Documentation updates

  • docs: Data Classes Utility (#171) by @cakepietoast
  • docs: add testing tips, increase content width, and improve log sampling wording (#174) by @heitorlessa

πŸ› Bug and hot fixes

  • fix: remove DeleteMessageBatch call to SQS api if there are no messages to delete (#170) by @cakepietoast
  • fix: add missing tests, correct calls to DictWrapper constructor and improve metrics type hints (#168) by @michaelbrewer

This release was made possible by the following contributors:

@cakepietoast, @heitorlessa, @jamesls and @michaelbrewer

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

NewReleases is sending notifications on new releases.