-
Notifications
You must be signed in to change notification settings - Fork 406
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
Add AppConfig parameter provider #187
Comments
Hi @thomasklinger1234 ! Sounds interesting. Thinking about how the developer experience would be like, AppConfig has a few moving parts compared to the other solutions. To retrieve a value, AppConfig needs the following parameters: Application, Environment, Configuration and ClientId. Semantically speaking, Configuration is the configuration name to get, equivalent to the name of the parameter when we do I think Application should correspond to For ClientId, the Lambda extension for AppConfig dynamically generate a new ClientId for every Lambda execution environment. So if a function has 7 execution environment at a given time, that would be 7 different client ids. Developer experienceSo the developer experience would look like this: from aws_lambda_powertools.utilities import parameters
appconfig_provider = parameters.AppConfigProvider(
application="my_app", # or set through POWERTOOLS_SERVICE_NAME
environment="feat-123",
# Question: should we expose client_id or keep it internal?
client_id=str(uuid.uuid4()) # or generated automatically
)
def handler(event, context):
# Retrieve a value from AppConfig
value = appconfig_provider.get("my-configuration") |
@nmoutschen Sounds exactly like my thoughts! Thanks for your extensive answer. I am willing to create a pull request for this, now that I have some initial positive feedback :) |
Hey @thomasklinger1234 ! I'd be happy to get a PR from you on this. 😄 Happy to help if you have any question along the way as well. |
Same here @thomasklinger1234 - We'd all be happy to help getting this implementation off the ground ;) |
@heitorlessa so i think i'll give it a shot. If I wont be able to finish it, i'll let you know. I need to look at the tests for the other parameters utils first. |
@heitorlessa @nmoutschen |
hey everyone - This is now available on 1.10 on PyPi and on SAR :) Closing this now, and thank you for @thomasklinger1234 for raising it, @risenberg-cyberark for the implementation and @nmoutschen for the support ;) |
Is your feature request related to a problem? Please describe.
Currently, the parameter provider supports SSM, SecretsManager and DynamoDB. However, there is another configuration service which currently is not implemented: AppConfig.
Describe the solution you'd like
Create a native implementation for
AppConfigProvider
. It will fetch the current configuration version based on application, environment and (optionally) client configuration version. If the client is not set, it should default toPOWERTOOLS_SERVICE_NAME
.NOTE For the
_get_multiple
function I do not have a clever semantic mapping for AppConfig. This is something that should be discussed.For DynamoDB this is multiple items, for SSM multiple parameters. Some considerations for multiple parameters:
Describe alternatives you've considered
I have implemented it on my own following https://awslabs.github.io/aws-lambda-powertools-python/utilities/parameters/#create-your-own-provider but it would be nice to have this in powertools integrated.
Additional context
The text was updated successfully, but these errors were encountered: