We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5260e90 commit 0b43920Copy full SHA for 0b43920
aws-opentelemetry-distro/src/amazon/opentelemetry/distro/_utils.py
@@ -46,7 +46,11 @@ def get_aws_session():
46
# pylint: disable=import-outside-toplevel
47
from botocore.session import Session
48
49
- return Session()
+ session = Session()
50
+ region = os.environ.get("AWS_REGION") or os.environ.get("AWS_DEFAULT_REGION")
51
+ if region:
52
+ session.set_config_variable("region", region)
53
+ return session
54
return None
55
56
0 commit comments