Skip to content

X-RAY creates new session with hardcoded region #167

Closed
@polamayster

Description

@polamayster

There is probably a reason why new session is created with specific region us-west-2 (is X-Ray available only in this region?):

def _create_xray_client(self, ip='127.0.0.1', port='2000'):
    session = botocore.session.get_session()
    url = 'http://%s:%s' % (ip, port)
    return session.create_client('xray', endpoint_url=url,
                                 region_name='us-west-2',
                                 config=Config(signature_version=UNSIGNED)
                                 )

but can it be changed to:

boto3.client('xray',...)

so existing default boto3 session could be reused under the hood?
Usecase: application using IAM role to not throttle on call to /v2/credentials/ in each process/worker when those credentials were already retrieved and stored in session?
If so, I can create MR with a change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions