-
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
Bug: AppConfig Provider Returning Wrong Configuration #3194
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
Hello @mekaeelkarim! Thank you for opening this issue. I was able to reproduce the error and will work to fix it. We will likely include this fix in our next release, which is scheduled for tomorrow. |
Hi @leandrodamascena, sounds good. Thanks for looking into this! |
|
This is now released under 2.26.0 version! |
Expected Behaviour
When using the
AppConfig Provider
to fetch user specific configurations at runtime based on the identity of the requester that invokes our lambda function, we expect the correct configuration to be returned. Our AppConfig Application and Environment names are used to instantiate a globalAppConfig Provider
object at runtime, and the this provider is used to fetch the configuration specific to the requester multiple times throughout the execution of the request in that lambda container. We do not cache the profile and instead rely on the caching that is built into theAppConfig Provider
.Current Behaviour
What we are seeing is that when multiple requests are being made at the same time from different users (across different lambda invocations), the AppConfig provider will be called to fetch the configuration with the right username, but return the wrong configuration profile (it will be called with user A, but return user B's profile). We have tried turning off caching of the profiles and this did not help. All we are doing is calling that initialized AppConfigProvider with the config_name that is specific to each user when we need to fetch that profile. It is important to note that for each request, we only need to fetch one profile that is scoped to the user who made the request.
Code snippet
Possible Solution
No response
Steps to Reproduce
Multiple requests attempting to fetch different configurations at the same time should be able to reproduce this error. The TPS for our service should not be more than 2-3 per second at most. Lambda containers being reused across requests most likely does play a part here.
Powertools for AWS Lambda (Python) version
2.17
AWS Lambda function runtime
3.8
Packaging format used
Lambda Layers
Debugging logs
No response
The text was updated successfully, but these errors were encountered: