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 1656ed8 commit 9ee3365Copy full SHA for 9ee3365
aws_lambda_powertools/shared/user_agent.py
@@ -160,6 +160,10 @@ def register_feature_to_resource(resource, feature):
160
161
def inject_user_agent():
162
if inject_header:
163
+ # Some older botocore versions doesn't support register_initializer. In those cases, we disable the feature.
164
+ if not hasattr(botocore, "register_initializer"):
165
+ return
166
+
167
# Customize botocore session to inject Powertools header
168
# See: https://github.com/boto/botocore/pull/2682
169
botocore.register_initializer(_initializer_botocore_session)
0 commit comments