Skip to content

AWS Session Token is ignored in Wrangler Session  #154

@alexanderromanov

Description

@alexanderromanov

Reproduction steps:
Create Wrangler Session like this:

    sts_client = boto3.client('sts')
    assume_resp = sts_client.assume_role(RoleArn=some_role,
                                         RoleSessionName=str(uuid.uuid4()),
                                         DurationSeconds=3600)
    role_credentials = assume_resp['Credentials']

    boto_session = boto3.session.Session(aws_access_key_id=role_credentials['AccessKeyId'],
                                         aws_secret_access_key=role_credentials['SecretAccessKey'],
                                         aws_session_token=role_credentials['SessionToken'])

    role_session = awswrangler.Session(aws_access_key_id=role_credentials['AccessKeyId'],
                                            aws_secret_access_key=role_credentials['SecretAccessKey'],
                                            aws_session_token=role_credentials['SessionToken'])

and then make some request to AWS with it.

Expected result: request goes through

Actual result: exception from boto client
"botocore.exceptions.ClientError: An error occurred (InvalidClientTokenId) when calling the GetCallerIdentity operation: The security token included in the request is invalid."

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmajor releaseWill be addressed in the next major release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions