Skip to content

Conversation

@howethomas
Copy link
Contributor

@howethomas howethomas commented Dec 10, 2025

The S3 storage module was not passing the region_name parameter to the boto3 client, causing AWS to default to us-east-1. When buckets were in different regions, this caused AuthorizationHeaderMalformed errors.

Changes:

  • Add _create_s3_client() helper that properly passes aws_region
  • Support endpoint_url for S3-compatible services (MinIO, LocalStack)
  • Update example_config.yml with region option
  • Rewrite README with accurate configuration documentation
  • Add comprehensive test suite (23 tests)

Fixes region error reported by @mikeonslow

🤖 Generated with Claude Code


Note

S3 storage now passes aws_region and supports endpoint_url, with updated config/docs and a comprehensive test suite.

  • Storage (S3):
    • Add _create_s3_client to pass aws_region and optional endpoint_url to boto3.client.
    • Refactor save/get in server/storage/s3/__init__.py to use _create_s3_client; support optional s3_path and date-based keys.
  • Config:
    • Update example_config.yml S3 options: add aws_region; document optional endpoint_url, s3_path.
  • Docs:
    • Rewrite server/storage/s3/README.md with accurate options, region guidance, features, key structure, and best practices.
  • Tests:
    • Add tests/storage/test_s3.py covering client creation (regions/endpoints), save/get behavior, key prefixes, and error handling.
    • Add empty tests/storage/__init__.py.

Written by Cursor Bugbot for commit 3dcbf18. Configure here.

The S3 storage module was not passing the region_name parameter to the
boto3 client, causing AWS to default to us-east-1. When buckets were in
different regions, this caused AuthorizationHeaderMalformed errors.

Changes:
- Add _create_s3_client() helper that properly passes aws_region
- Support endpoint_url for S3-compatible services (MinIO, LocalStack)
- Update example_config.yml with region option
- Rewrite README with accurate configuration documentation
- Add comprehensive test suite (23 tests)

Fixes region error reported by @mikeonslow

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on December 28

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Comment @cursor review or bugbot run to trigger another review on this PR

Co-authored-by: thomas.howe <thomas.howe@strolid.com>
@cursor
Copy link

cursor bot commented Dec 10, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

howethomas and others added 2 commits December 10, 2025 16:35
Tests now align with the refactored _build_s3_key helper that uses
a simpler key format without date-based directories.

Added 6 new tests for _build_s3_key helper function.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Without this file, pytest in Docker was incorrectly resolving
tests/storage as the server/storage module, causing import errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@howethomas howethomas merged commit c08f476 into main Dec 10, 2025
1 check passed
@howethomas howethomas deleted the vigorous-kare branch December 10, 2025 22:41
howethomas added a commit that referenced this pull request Jan 16, 2026
Fix S3 storage to honor region configuration
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.

3 participants