Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support using AWS Session token #46

Open
Avinash-1394 opened this issue Feb 1, 2024 · 0 comments · May be fixed by #47
Open

Support using AWS Session token #46

Avinash-1394 opened this issue Feb 1, 2024 · 0 comments · May be fixed by #47

Comments

@Avinash-1394
Copy link

Description

Even though the session token is derived from the config/env, it is not utilized when connecting so I am running into a DatabaseError when the cursor executes

Expected output

The query should be executed with no issues

Actual output

DatabaseError: An error occurred (UnrecognizedClientException) when calling the StartQueryExecution operation: The security token included in the request is invalid.

Suggestion

Connection to Athena here - https://github.com/MeltanoLabs/target-athena/blob/main/target_athena/athena.py#L40 should be updated to

cursor = connect(
            aws_access_key_id=aws_access_key_id,
            aws_secret_access_key=aws_secret_access_key,
            aws_session_token=aws_session_token,
            region_name=aws_region,
            s3_staging_dir=s3_staging_dir,
            work_group=athena_workgroup,
        ).cursor()
@Avinash-1394 Avinash-1394 linked a pull request Feb 1, 2024 that will close this issue
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant