Skip to content

🐛(s3) use a valid default region for custom endpoints - #122

Merged
juliendemoutiez merged 1 commit into
mainfrom
fix/s3-default-region
Nov 3, 2026
Merged

juliendemoutiez merged 1 commit into
mainfrom
fix/s3-default-region

Conversation

@juliendemoutiez

Copy link
Copy Markdown
Contributor

Description of change

Attachment uploads fail with a 500 when S3_REGION is not set:

Region not accepted: region="-" is not a valid hostname component.

The S3 hook falls back to region: '-' when no region is configured. Since the
@aws-sdk/client-s3 bump in #100 (3.698.0 → 3.1132.0), the SDK requires the region to
be a valid hostname component and rejects '-'.

Current behavior: uploads fail on staging. Prod still works only because it runs a
build from before #100. It will break the same way on its next deploy.

New behavior: the fallback region is us-east-1. With a custom endpoint (Scaleway),
the region is only used for SigV4 signing, so any valid value works.

Pull-Request Checklist

  • Code is up-to-date with the main branch
  • npm run lint passes with this change
  • npm run test passes with this change
  • This pull request links relevant issues as Fixes #0000 — N/A
  • There are new or updated unit tests validating the change — N/A (no test setup for ally against the SDK)
  • Documentation has been updated to reflect this change — N/A
  • The new commits follow conventions outlined in the conventional commit spec — follows the repo's gitmoji convention

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@juliendemoutiez
juliendemoutiez merged commit 7ec05a8 into main Nov 3, 2026
5 of 6 checks passed
@juliendemoutiez
juliendemoutiez deleted the fix/s3-default-region branch November 3, 2026 13:04
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