duckdb / duckdb_aws

MIT License
34 stars 12 forks source link

AWS credentials not loading after load_aws_credentials() function call #37

Open cjaber opened 3 months ago

cjaber commented 3 months ago

Hello, I am new to duckdb and hope I am not doing something in a wrong way. When trying to write a parquet file into S3, I am getting a "forbidden"! Even if my credentials file exists in ~/.aws/credentials

duckdb_con.sql(f"""
                       INSTALL aws;
                       LOAD aws;
                       CALL load_aws_credentials();
                    """)

results:

┌──────────────────────┬──────────────────────────┬──────────────────────┬───────────────┐
│ loaded_access_key_id │ loaded_secret_access_key │ loaded_session_token │ loaded_region │
│       varchar        │         varchar          │       varchar        │    varchar    │
├──────────────────────┼──────────────────────────┼──────────────────────┼───────────────┤
│ NULL                 │ NULL                     │ NULL                 │ us-east-1     │
└──────────────────────┴──────────────────────────┴──────────────────────┴───────────────┘

I need to explicitly set the credentials like:

                       --SET s3_region='eu-west-1';
                       --SET s3_access_key_id='XXXX';
                       --SET s3_secret_access_key='XXXXX';

FYI, I succeeded in doing a put with BOTO3 in the same python project I use: python 3.11.7 duckdb 0.9.2 package macOS sonoma

Best regards,