From 0c2d105f58b5156d85e355b3dcdad4cb0335e43d Mon Sep 17 00:00:00 2001 From: Leandro Damascena Date: Mon, 28 Jul 2025 18:23:52 +0100 Subject: [PATCH] chore(ci): improve feature flags UA --- .../utilities/feature_flags/appconfig.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/aws_lambda_powertools/utilities/feature_flags/appconfig.py b/aws_lambda_powertools/utilities/feature_flags/appconfig.py index 2becf16d0fd..2c3ca36f741 100644 --- a/aws_lambda_powertools/utilities/feature_flags/appconfig.py +++ b/aws_lambda_powertools/utilities/feature_flags/appconfig.py @@ -87,6 +87,17 @@ def __init__( boto3_session=boto3_session, ) + # Override the user agent to use "feature_flags" instead of "parameters" + self._register_feature_flags_user_agent() + + def _register_feature_flags_user_agent(self): + """Register feature_flags user agent to the AppConfig client""" + from aws_lambda_powertools.shared import user_agent + + # Register feature_flags to the client used by the AppConfigProvider + if hasattr(self._conf_store, "client") and self._conf_store.client is not None: + user_agent.register_feature_to_client(client=self._conf_store.client, feature="feature_flags") + @property def get_raw_configuration(self) -> dict[str, Any]: """Fetch feature schema configuration from AWS AppConfig"""