duckdb_aws
duckdb_aws copied to clipboard
Public S3 bucket fails to read when AWS env vars are set
If AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set in the environment, the query:
SELECT * FROM read_parquet('s3://coiled-datasets/timeseries/20-years/parquet/part.0.parquet') LIMIT 5;
fails, even though the bucket is public.
DuckDB automatically uses the environment AWS credentials even when no S3 secret has been created. I expected DuckDB to ignore env vars unless I explicitly create a secret like:
CREATE SECRET s3 (TYPE s3, PROVIDER credential_chain);
This makes public S3 buckets unreadable when any AWS env vars are present.