v1.15.0 #423
Closed
heitorlessa
started this conversation in
Show and tell
v1.15.0
#423
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
This release has three major goodies: 1/ Idempotency utility is now GA, 2/ New API Gateway and ALB event handler, and 3/ MANY enhancements to Logger.
Idempotency
Idempotency utility was introduced in 1.11.0 as beta. If you haven't used it yet, it converts Lambda functions into idempotent operations that are safe to retry - This is mostly needed when your code is not idempotent.
Since launch, we've made improvements to error handling and documentation updates. This gives us confidence that the UX won't radically change and therefore can be used safely moving forward.
API Gateway and ALB event handler
This new utility provides a lightweight routing to reduce boilerplate for API Gateway REST/HTTP API and ALB. It also natively integrates with Data classes utility giving you handy methods and self-documented properties of API Gateway and ALB events.
It's important to note that this is not a replacement for fully fledged web frameworks like Flask and Djano, or microframeworks like Chalice. Instead, this gives you a nearly zero overhead (~1-2ms) lightweight solution to build applications on top of either API Gateway or ALB.
As a trade-off for being so lightweight, you have to setup infrastructure to use Lambda Proxy Integration using your preferred framework be that CloudFormation, SAM, CDK, Terraform, etc. Rest assured we provide a sample template to demonstrate how you can configure it if you haven't done this yet.
Did I say CORS is simplified too? :)
Logger
This release makes Logger more flexible by allowing you to bring your own Logging Formatter and Handler. It also includes a ton of improvements such as:
LambdaPowertoolsFormatter
utc=True
flagappend_keys()
andremove_keys()
. The previous method,structure_logs(append=True, ...)
, will continue to work for backwards compatibility and will be effectively when we decide to cut a major version (2.0) - warnings will be place in time toosampling_rate
key only gets added when feature is addedtimestamp
key now includes timezone at the end: from2021-05-03 11:47:12,494
to2021-05-03 11:47:12,494+0200
API Gateway support for Parser
You can now easily parse and run deep data validation with
APIGatewayProxyEvent
in Parser, including an envelopeApiGatewayEnvelope
.Metrics
Last but not least, you can now set default metric dimensions to ensure these will always be added across all metrics:
metrics.set_default_dimensions(environment="prod", another="one")
Changes
🌟New features and non-breaking changes
🌟 Minor Changes
cors=None
setting (feat(event-handler): allow forcors=None
setting #421) by @michaelbrewer📜 Documentation updates
🐛 Bug and hot fixes
Internal
This release was made possible by the following contributors:
@carlos-alberto, @heitorlessa, @michaelbrewer and @risenberg-cyberark
This discussion was created from the release v1.15.0.
Beta Was this translation helpful? Give feedback.
All reactions