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

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

Summary

This is an emergency release to fix a critical Batch bug spotted by @kimberlyamandalu, where multiple failed records weren't reported due to dictionary key uniqueness - If you are using BatchProcessor, please update to 1.24.1 as soon as possible.

New official tutorial

Thanks to the gigantic effort by @mploski and @am29d on reviewing it, we now finally have an official tutorial covering core Powertools features. The tutorial demonstrates how new customers can add one feature at a time. It also opens the door to create other tutorials covering other complex features in more depth.

Please do let us know your thoughts and what other tutorials we should focus on next ;-)

image

New tiny function to copy Logger config to external loggers

A common question we receive is: How can I enable powertools logging for imported libraries?

Thanks to @mploski, we now have a tiny standalone function you can use to copy your current Logger config to any or a select list of loggers you want.

Why would people want that? It's a fair question. Reason is sometimes you want external libraries to have the exact same structured logging that your application has. This function allows you to specify which explicit loggers you wanna copy config to (or all), and whether you want to set a different log level.

import logging

from aws_lambda_powertools import Logger
from aws_lambda_powertools.logging import utils

logger = Logger()

external_logger = logging.logger()

utils.copy_config_to_registered_loggers(source_logger=logger)
external_logger.info("test message")

Big thanks to new contributors @thehananbhat @j2clerck on helping us make documentation better (critical to us!).

Changes

🌟New features and non-breaking changes

  • feat(logger): clone powertools logger config to any Python logger (#927) by @mploski

🌟 Minor Changes

πŸ“œ Documentation updates

  • docs(tutorial): fix path to images (#963) by @mploski
  • docs(batch): snippet typo in custom batch processor (#961) by @thehananbhat
  • docs(batch): snippet typo on batch processed messages iteration (#951) by @j2clerck
  • docs(nav): make REST and GraphQL event handlers more explicit (#959) by @heitorlessa
  • docs(logger): fix code block syntax in FAQ (#952) by @mozz100
  • docs(tutorial): add new tutorial covering core features (#769) by @mploski
  • docs(homepage): link to typescript version (#950) by @michaelbrewer
  • fix(parameters): appconfig internal _get docstrings (#934) by @ran-isenberg
  • docs(batch): fix typo in context manager keyword (#938) by @heitorlessa
  • feat(logger): clone powertools logger config to any Python logger (#927) by @mploski

πŸ› Bug and hot fixes

πŸ”§ Maintenance

This release was made possible by the following contributors:

@dependabot, @dependabot[bot], @heitorlessa, @j2clerck, @michaelbrewer, @mozz100, @mploski, @ran-isenberg, @thehananbhat and Michal Ploski

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

NewReleases is sending notifications on new releases.