Search
AWS S3 SDK Credential Auto-Detection Issue with Public Buckets (ClickHouse)
This was found in realation with ClickHouse example on clickhouse-modeling-rill-example/sources/noaa-weather.yaml.
# Problem
ClickHouse fails to read from public S3 buckets with error:
|
|
# Root Cause
ClickHouse automatically tries to use AWS credentials (from environment variables, IAM roles, etc.) even for public buckets. When these credentials are invalid/expired, AWS SDK calls sts:GetCallerIdentity and fails.
# Solution
Force anonymous access by adding NOSIGN parameter:
|
|
# Rill Example
In your Rill model YAML, update the s3() function call:
|
|
Complete working example: GitHub - ClickHouse Rill Example
# When This Happens
- You have
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEYset in environment- having these set locally means it also works without
NOSIGN
- having these set locally means it also works without
- Credentials are expired/invalid
- Accessing public S3 buckets that don’t require authentication
- Working across different machines/environments with different AWS setups
# Quick Test
|
|
Remember: Always use NOSIGN when accessing public S3 buckets in ClickHouse to avoid credential validation issues.
Origin: AWS S3, @ssp.sh on Bluesky