-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Lambda Powertools for Python v2 #1459
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
Thank you @rubenfonseca! Let's make Event Handler Headers part of v2 as this will impact our ability to support cookies and multi-value headers without a maintenance hit -- #1455 We should also add that we're going to make minimal breaking changes due to not having ample time to discuss and run experiments with customers - we shall leave those to 3.0 (modularization, potentially making pydantic the default, etc.) |
@heitorlessa thanks, updated! Do you know if an existing issue about removing the first batch processing implementation? |
Nope, haven't created yet. We'd need to make a PR to add a deprecation warning too. |
We started creating an "Upgrade guide" with detailed upgrade steps for each breaking change, together with before/after examples. This will help everyone go faster through each major version changes. |
I'd like to propose we make all dependencies optional until we modularise in V3. Although we managed to reduce >90% of AWS SDK, keeping AWS X-Ray SDK as a main dependency brings the full AWS SDK - this won't benefit customers using pip install. This would be a boost for customers not using X-Ray, those with sensitive startup time, and reduce build/deployment times. Compressed 11M lambda_powertools_v1.zip
464K lambda_powertools_v2.zip Uncompressed 75M /tmp/lambda_powertools_v1
1.8M /tmp/lambda_powertools_v2 |
Early days but we started documenting the breaking changes in v2: https://awslabs.github.io/aws-lambda-powertools-python/v2/upgrade/ @rubenfonseca one thing we missed is adding another bullet point on |
I'd love to see strict typing supported in v2. As an example: #1089 |
Added #1506 to v2 |
@kapilt and everyone else interested in smaller package size - @rubenfonseca just made a breakthrough for V2. Our new Lambda Layer (v2) will be just For V2 launch this month, @rubenfonseca is also completing the work for an ARM Lambda Layer. |
Last update before we launch 2.0 this week
We're working on one last change:
In parallel, we're updating (1) GitHub Actions workflows to support v1 and v2 releases, (2) Upgrade Guide to ensure it is as clear as it can be, (3) clean up this RFC body to reflect where we are and share V1 will be in maintenance mode until Jan 31st. Until end of the weekYou should expect a (A) lengthy Release Notes (What's New in 2.0), a (B) detailed Upgrade Guide for three breaking changes that might affect you, (C) a significant package size reduction (10M-->204k), and a (D) much improved Lambda Layer with all dependencies optimized (14M-->2M), including ARM support! @mew1033 @peterschutt after V2 is launched, let's bring This will open a future door that we could use mypyc to compile certain parts of our code base to be a C-extension for extra speed. Now that we fully migrated our Lambda Layer pipeline and already use Cython for Parser, it'll be a no brainier to generate platform wheels too when the time is appropriate. |
Sounds great! I'll touch base with you after the v2 launch, congrats! |
ya'll are awesome - great work @heitorlessa / @rubenfonseca 🎉 |
All Ready! We're gonna publish a pre-release to test all workflows, and then we start writing the official Release Notes for 2.0. Finally! 🎉 |
We just released AWS Lambda Powertools Python v2! 🎉🎉🎉🎉 Don't forget to check our Upgrade Guide too :) Thank you everyone for your help getting this our of the door! 🙏 Onwards and upwards! 🎉 |
|
Is this related to an existing feature request or issue?
No response
Which AWS Lambda Powertools utility does this relate to?
Powertools itself
Summary
The Python 3.6 Lambda Runtime was deprecated as of Aug 17th 2022. This follows Python 3.6 End-Of-Life (EOL) reached on December 23, 2021. This means it's not possible to create or update Lambda functions using that runtime.
We should take this opportunity to release a new major version of Powertools, and decide what breaking changes to include.
Use case
Customers need to upgrade their Lambda Functions to one of the supported Python runtimes (at the moment of writing, Python 3.7-3.9).
We could use this major upgrade to introduce some breaking changes on Lambda Powertools that will simplify the code and/or improve support for existing features.
Proposal
We strive to make minimal breaking changes due to timing constraints with Python 3.6 deprecation. In ideal scenarios, we would provide ample time, nightly builds, a Beta for a major version, including a linter to help detect and upgrade from breaking changes.
This means, V2 will focus primarily on the following themes:
sqs_batch_processor
andPartialSQSProcessor
in favour ofBatchProcessor
launched 11 months ago that improved accuracy, security, and speed due to the new Lambda integration.Event Handler (API Gateway)
doesn't support multi-header and cookies by default as it requires a breaking change. Similarly,Idempotency
andTracer
doesn't use fully qualified names, impacting ABC or Classes that use the exact same method name - changing it would impact billions of transactions in production.Quick summary
POWERTOOLS_EVENT_HANDLER_DEBUG
env varsqs_batch_processor
,PartialSQSProcessor
)GetConfiguration
deprecationAttributeValue
inDynamoDBStreamEvent
with deserialized Python valuesemail-validator
dependency withstr
in Parser SES ModelLaunch plan
publish_v2_layer.yml
Out of scope
We should make the breaking release as small as possible. For this we should not include in v2:
Potential challenges
We need to decide what to do with the Lambda Powertools Layer. One option would be to release a new "V2" layer.
UPDATE: We're launching a separate V2 layer and ARM support along with it!
Dependencies and Integrations
No response
Alternative solutions
No response
Acknowledgment
The text was updated successfully, but these errors were encountered: