Skip to content

Commit 2cedb72

Browse files
chore(ci): improve feature flags UA (#7051)
1 parent d017744 commit 2cedb72

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

aws_lambda_powertools/utilities/feature_flags/appconfig.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,17 @@ def __init__(
8787
boto3_session=boto3_session,
8888
)
8989

90+
# Override the user agent to use "feature_flags" instead of "parameters"
91+
self._register_feature_flags_user_agent()
92+
93+
def _register_feature_flags_user_agent(self):
94+
"""Register feature_flags user agent to the AppConfig client"""
95+
from aws_lambda_powertools.shared import user_agent
96+
97+
# Register feature_flags to the client used by the AppConfigProvider
98+
if hasattr(self._conf_store, "client") and self._conf_store.client is not None:
99+
user_agent.register_feature_to_client(client=self._conf_store.client, feature="feature_flags")
100+
90101
@property
91102
def get_raw_configuration(self) -> dict[str, Any]:
92103
"""Fetch feature schema configuration from AWS AppConfig"""

0 commit comments

Comments
 (0)