-
Notifications
You must be signed in to change notification settings - Fork 139
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
Feature request: implement AppConfigProvider
#1177
Comments
Hello, @dreamorosi. I'm ready to help, but the scope of this PR is bigger than usual, and I don't know where to start. My plan is:
Correct me if I'm wrong with my mental model about the Speaking of implementation, I need to add my provider class that will extend Thank you for the guidance as always! |
Hi @shdq thank you for the bias for action, I'm happy to support you throughout the process.
Yes, that's correct. We should support the same behavior and leverage the logic as much as it make sense, while at the same time being idiomatic in JS/TS. To convey this point, let's look at this function in Python and its corresponding version I have been implementing in SSMProvider. The Python version uses keywords/named arguments in the function signature, which is a staple in Python. On the other hand, since JS doesn't really have an equivalent and we want to apply strong typing, we are using an object with the configurations. As a rule of thumb, I would start with a first implementation that ports 1:1 (or rather 1:as-much-as-possible) the Python implementation to JS/TS. Then, after that we can iterate during the review phase or even future PRs before the actual release.
That's what I would recommend, yes. While you review the PR, please feel free to leave comment and suggestions. Similar to what you currently see in #1187, I would expect the bulk of the changes to happen in a new Like you correctly stated, the class you're going to create extends the
Correct, you can add the SDK as dev dependency for now (
Your mental model is correct. Generally speaking, we see customers wanting to retrieve secrets like a database connection string, parameters like application ID or other dynamic values that are independent from the code. In the specific case of AppConfig, we see mainly retrieval of feature flags or other more structured configurations that will influence the behavior of the Lambda function, think a multi-tenant application that unlocks some features based on the tenant's membership. In terms of how we see customers using these libraries, I think the best place to start would be the Powertools for Python's docs for Parameters. If instead you want to read how Lambda use AppConfig, you can read the first half of this blog post. This post is written with Lambda Extensions in mind, however we are going to follow a different implementation strategy, which is a library (Powertools) Let me know if this clarifies things a bit and also feel free to ask follow up questions. I'm also available to have a call if you think it can help. |
|
Summary
The Parameters utility should allow customers to retrieve one parameter stored in a AppConfig.
This work includes the following tasks:
Why is this needed?
1/ So that customers are able to retrieve parameters from AppConfig, 2/ to reach feature parity with Powertools for Python.
Which area does this relate to?
Parameters
Solution
No response
Acknowledgment
The text was updated successfully, but these errors were encountered: