-
Notifications
You must be signed in to change notification settings - Fork 154
Docs: Document that getAppConfig can only be reused for the same AppConfig application & environment #3801
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
Comments
Hi @HaaLeo, thank you for bringing this up. This is indeed the case, but just to understand better - in which context would you have two app/environment combinations in the same function? If I remember correctly we implemented it this way because when it comes to AppConfig the idea is to group all the configurations for the same app and environment combinations in the same config entity. |
Hi @dreamorosi, thx for the swift reply. In our setup each service defines its appconfig configuration. In our CI/CD pipeline multiple services can be deployed at the same time. As stated here one can only deploy one config to one appconfig environment at the same time. In our setup this would lead to conflicts during deployment. Therefore, as a workaround we introduced one environment per stage per service. That being said we now have a single lambda function acts as single entrypoint / router. This lambda now checks which services' features are en-/disabled to route the request correctly or drop it otherwise. So this lambda function needs to check different appconfig environments. So I understand that this is rather a uncommon design. That's also why I created this as a documentation enhancement rather than a bug/feature-request. |
This issue is now closed. Please be mindful that future comments are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so. |
This is now released under v2.18.0 version! |
What were you searching in the docs?
Subsequent calls to
getAppConfig
for different applications/environments fail. Looking at its implementation it make sense because theenvironment
as well as theapplication
arguments are cached.Therefore, something like this fails with some unintuitive "ConfigurationNotFound" error:
Is this related to an existing documentation section?
https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/parameters/#fetching-app-configurations
How can we improve?
Just state that the applications/environment arguments are cached and one has to go with the
AppConfigProvider
class if one wants to fetch multiple configurations from multiple apps/environments within the same lambda function.Got a suggestion in mind?
N/A
Acknowledgment
The text was updated successfully, but these errors were encountered: