user agent is not actually being modified · Issue #25 · aws/aws-encryption-sdk-python (original) (raw)
Problem
I could have sworn I checked this, but apparently the user agent modification we are doing is not actually taking effect.
Solution
It looks like this needs to be modified on the botocore level, not on the boto3 client level. Unfortunately, this means that we cannot modify the user agent if a user provides a custom KMS client, as we should not be modifying a botocore client that might be used for something else.
In KMSMasterKeyProvider
we can modify the botocore client if we build it directly. However, we should not modify a botocore client that was provided to us.
TODO
Make sure that there is not a way to modify the user agent at the boto3 client layer.