-
Notifications
You must be signed in to change notification settings - Fork 404
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
Maintenance: Change parameters appconfig utility API due to GetConfiguration deprecation #1506
Comments
@leandrodamascena FYI, opened as you requested. |
Thank you @ran-isenberg. @leandrodamascena @rubenfonseca this should be noted in V2 because we will have to warn customers that they'll have to bring their own AWS SDK for this to work --- these APIs fail today when using AWS Lambda provided SDKs. Let's give a ping to the Lambda team in the meantime |
@heitorlessa this APIs will fail only on news accounts that didnt use the old API before. For existing accounts that already use it, they will continue to work (told me by AppConfig team). |
@heitorlessa All we need to do is fix the API call here, which should be a transparent fix. Since the AppConfig said it's going to affect new accounts very soon, i think we should solve this ASAP |
Hi @ran-isenberg! We've done some research and created some example code to simulate various scenarios and we have a few points to discuss before we start coding this. Can confirm that the old accounts still work with the GetConfiguration API, but the new accounts do not. When a new account tries to run this API, it gets an error like this:
We think a good way do this and without breaking any execution is to replace the get_configuration API call with the two new APIs indicated on the AppConfig page. We checked and this new API works on old and new accounts and on all Python runtimes (3.7, 3.8 and 3.9). But it's bring an additional problem and we need to deal with that before deciding which way to go. Duration using current api call: Both Lambda are using Python 3.9 and 128 MB of memory and we see that the second run takes at least 100 ms longer. I think we need to investigate further if there is a way to cache the execution and reduce this time. We appreciate if you have any insight into this. Thank you. |
@leandrodamascena thank you for advancing the research. Did you guys ask the appconfig team? I'll try to contact them too and point them to this thread. |
Did you try a second run? in the second run, you are not supposed to call the start configuration API but use the token from the get latest configuration. Did you notice the performance hit in that instance too? i think you need to store the token in the cache, if it's None, use the start config API, if not use the get latest conf API, set the new token from the response and return the config back. |
@leandrodamascena I think the top priority here should be to get this new API working for new accounts and research the 100ms later on with the AppConfig team. |
Hi @ran-isenberg! Thanks for the feedback. We’re gonna discuss this internally and come back with an update as soon as we can. |
Hi @ran-isenberg, thank you so much for opening this and collecting information about the problem. We want to move forward with a change in the implementation that uses
We want to take some time to analyze this, explore any possible alternatives to mitigate it, and/or completely document the changes, so users are aware of the implications in run time (and cost). So we will tackle this on the v2 branch, which we are tracking to the end of September. Action: add this issue to the v2 RFC |
@rubenfonseca Thanks for doing the research. 140ms performance hit is negligible when the entire utility is broken. |
We hear you, Ran. This deprecation is unusual from AWS standards, so we’re
investigating internally before we set on a direction.
We appreciate your patience and bias for action nevertheless.
…On Thu, 15 Sep 2022 at 14:15, Ran Isenberg ***@***.***> wrote:
@rubenfonseca <https://github.com/rubenfonseca> Thanks for doing the
research.
I want to stress out the fact that it IS a breaking change and there's no
getting around it.
In addition, to my understanding, the old API will stop working for new
accounts try to use it very soon, so it's important this gets solved ASAP.
140ms performance hit is negligible when the entire utility is broken.
—
Reply to this email directly, view it on GitHub
<#1506 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZPQBEJPDES3SEZSURMNUDV6MOQLANCNFSM6AAAAAAQICFYWE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@heitorlessa Thank you! |
Hi @ran-isenberg! We appreciate your patience as we investigated this deprecation with the AppConfig team. We've come to an agreement that the AppConfig documentation will be updated to clarify the confusion as to when
Until the docs are updated, the
From our side, we're taking the following actions:
We understand how critical this is to you. As such, we will prioritize it for our next release. |
Thanks everybody, too bad it' still a breaking change in the end. Internally we use a wrapper library that adds pyadnatic parsing to the feature flags so I can increase the major version there and prevent the breakage in production. Do you have any confirmation/insights as to the performance degradation? |
On perf, it's slower and consistent with what @rubenfonseca and @leandrodamascena shared. There's a cold start penalty and an increase of ~40ms for each call made compared to @leandrodamascena will crack on the change for the feature flags unless you have any other red flags. After released, it might be a good time to revisit Feature Flags Store DX to make it GA soon as I wasn't able to prioritize it back then. |
Sounds good to me! |
@ran-isenberg Sadly, there will be delays here. @leandrodamascena tried implementing the two new APIs and found edge cases that could lead to production issues[1]. Leandro is cutting a ticket to the AppConfig team with proof of concepts to confirm that's the new customers' expectation. [1] These are the immediate scenarios that @leandrodamascena ran into today. Scenario A: Fetch an existing configuration in short intervals
ChallengeWe'd need to keep track of the polling period + Powertools Parameter max_age that prevents unnecessary network I/O; a minor inconvenience as we could use A risky workaround is calling Scenario B: Fetch an existing configuration in long intervals
ChallengeWe'd need to keep track of previous data retrieved + polling interval on a per It's a major inconvenience, because despite the name Scenario C: Fetch multiple configurations
ChallengeThis will increase latency by |
Thanks @heitorlessa and @leandrodamascena for the hard work and the amazing documentation! |
Update We've just heard from AppConfig team and they shared that We have one last sync this week to hear whether we can have a single roundtrip to fetch config from AppConfig like we used to. We also now sort of understand why the response is now empty ( Next steps
Once this is merged, you should be able to use V2 by installing directly from the branch (in case we have delays for V2 release due to Layer ground work):
|
Hi @heitorlessa and @ran-isenberg we have good news! As of now, we can start working on the PR review to merge this feature into v2. Thank you both for all the discussions and handling this issue in the best way! 🙏 |
Had one last call with the AppConfig team and we can now construct a timeline of events and clarify what went wrong. I'll start crafting that tomorrow, but until that's available know this: AppConfig did not enforce the deprecation. AppConfig Engineering team clarified that the Our action plan remains, and we're working with the AppConfig PM team to ensure customers receive the right messaging should they enforce this soft deprecation. |
As promised, here are all details about this deprecation and why it took us this long to get to the bottom of it. Thank you @ran-isenberg for the patience while we ironed out the details and address multiple misunderstandings on this matter. AWS AppConfig API DeprecationWhat happenedOn November 18th 2021, AWS AppConfig team released a new Data Plane endpoint ( On January 28th 2022, AWS AppConfig updated User Guide and API documentation to highlight that the On September 8th 2022, CyberArk contacted the AWS Lambda Powertools for Python team on Discord about the As of now, we already documented our actionable items towards Lambda Powertools for Python V2. We are also supporting the AppConfig team to improve messaging on this deprecation, based on our recent findings. We compiled a list of questions to help prevent further confusion for anyone else reading this in the future. Why did the AppConfig team deprecate
|
Done! |
@heitorlessa Thank you for the clear summary! I do wonder if the cost reduction for getting back an empty config is mitigated with the increased cost of extra lambda runtime. I guess it depends on the actual lambda usage overall. |
Closing as we're wrap to launch V2 |
|
Summary
The current API will be deprecated in the near future according to AWS AppConfig team.
See this
See https://github.com/awslabs/aws-lambda-powertools-python/blob/develop/aws_lambda_powertools/utilities/parameters/appconfig.py
Why is this needed?
GetConfiguration - this API action has been deprecated. Calls to receive configuration data should use the StartConfigurationSession and GetLatestConfiguration APIs instead.
Which area does this relate to?
Parameters
Solution
Use new APIs, hopefully in a non breaking manner.
Acknowledgment
The text was updated successfully, but these errors were encountered: