File tree 1 file changed +3
-1
lines changed
aws_lambda_powertools/utilities/parameters
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 10
10
import boto3
11
11
from botocore .config import Config
12
12
13
+ from ...shared import constants
13
14
from .base import DEFAULT_PROVIDERS , BaseProvider
14
15
15
16
CLIENT_ID = str (uuid4 ())
@@ -33,6 +34,7 @@ class AppConfigProvider(BaseProvider):
33
34
**Retrieves the latest configuration value from App Config**
34
35
35
36
>>> from aws_lambda_powertools.utilities import parameters
37
+ >>>
36
38
>>> appconf_provider = parameters.AppConfigProvider(environment="my_env", application="my_app")
37
39
>>>
38
40
>>> value : bytes = appconf_provider.get("my_conf")
@@ -66,7 +68,7 @@ def __init__(
66
68
67
69
config = config or Config ()
68
70
self .client = boto3 .client ("appconfig" , config = config )
69
- self .application = application or os .getenv ("POWERTOOLS_SERVICE_NAME" ) or "application_undefined"
71
+ self .application = application or os .getenv (constants . SERVICE_NAME_ENV , "service_undefined" )
70
72
self .environment = environment
71
73
self .current_version = ""
72
74
You can’t perform that action at this time.
0 commit comments