powertools-lambda-python icon indicating copy to clipboard operation
powertools-lambda-python copied to clipboard

Maintenance: Create a e2e test for multiple AppConfig profile calls

Open leandrodamascena opened this issue 2 years ago • 0 comments

Why is this needed?

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.

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.

Refer: #3194

Which area does this relate to?

Tests

Solution

No response

Acknowledgment

leandrodamascena avatar Oct 13 '23 10:10 leandrodamascena