aws / amazon-redshift-odbc-driver

Apache License 2.0
18 stars 6 forks source link

Connection to Redshift Cognito by AWS IAM Credentails failed - The security token included in the request is invalid #19

Open tominodavid opened 1 month ago

tominodavid commented 1 month ago

Driver version

2.1.0.0, 2.1.1.0 and 2.1.2.0

Redshift version

PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.66954

Client Operating System

Windows 11

Table schema

Problem description

  1. Expected behaviour: Connection to Redshift Cognito by AWS IAM Credentails will pass.

  2. Actual behaviour: Connection to Redshift Cognito fails when I try to use AWS IAM Credentials with Access Key ID, Secret Access Key and Session Token. image

  3. Error message/stack trace: [ ERROR] Redshift access error: ('HY000', '[HY000] [Redshift][ODBC Driver][Server][860:8:IAMConnectionError]: InvalidClientTokenId: The security token included in the request is invalid\n (0) (SQLDriverConnect); [HY000] [Redshift][ODBC Driver][Server][860:8:IAMConnectionError]: InvalidClientTokenId: The security token included in the request is invalid\n (0)')

  4. Any other details that can be helpful: With the same credentials the test pass when I use older version of Redshift driver 1.5.9 image

ODBC trace logs

redshift_odbc - Copy.log

Reproduction code

vahid110 commented 1 month ago

Hi @tominodavid Thank you for reporting this issue. I will report the problem to the respective team and will investigate the issue as soon as possible.