Skip to content

feat: add s3_region config for AWS S3 support#85

Open
mindrunner wants to merge 1 commit into
Blockdaemon:mainfrom
mindrunner:feat/s3-region
Open

feat: add s3_region config for AWS S3 support#85
mindrunner wants to merge 1 commit into
Blockdaemon:mainfrom
mindrunner:feat/s3-region

Conversation

@mindrunner

Copy link
Copy Markdown

AWS S3 requires the correct region in the signature. This PR adds an s3_region config option:

  • auto (default) - for S3-compatible services (GCP, R2, MinIO, etc.)
  • Actual region (e.g. eu-central-1) - for AWS S3

Problem:
When using AWS S3, requests fail with:

api error AuthorizationHeaderMalformed: The authorization header is malformed; the region 'auto' is wrong; expecting 'eu-central-1'

Solution:
Added s3_region config option that defaults to auto for backward compatibility but can be set to the actual AWS region when using AWS S3.

Config example:

s3_endpoint: "https://s3.eu-central-1.amazonaws.com"
s3_region: "eu-central-1"
s3_bucket: "my-bucket"

Environment variable:
S3_REGION=eu-central-1

AWS S3 requires correct region in signature. Added s3_region config option:
- 'auto' (default) for S3-compatible services (GCP, R2, MinIO)
- actual region (e.g. 'eu-central-1') for AWS S3

Fixes AuthorizationHeaderMalformed error when using AWS S3.
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 this pull request may close these issues.

1 participant