Skip to content

feat: add AWS_S3_FORCE_PATH_STYLE environment variable support #122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cayter
Copy link

@cayter cayter commented Jun 17, 2025

Summary

Adds support for the AWS_S3_FORCE_PATH_STYLE environment variable to enable path-style addressing for S3-compatible services.

Changes

  • Modified s3_client() function to check for AWS_S3_FORCE_PATH_STYLE environment variable
  • When set to "true", configures the S3 client with force_path_style(true)
  • Added Config import from aws_sdk_s3

Why

This enables Convex to work with S3-compatible services like MinIO, LocalStack, and other object storage providers that require path-style addressing (https://s3.amazonaws.com/bucket/key instead of https://bucket.s3.amazonaws.com/key).


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

## Summary
Adds support for the `AWS_S3_FORCE_PATH_STYLE` environment variable to enable path-style addressing for S3-compatible services.

## Changes
- Modified `s3_client()` function to check for `AWS_S3_FORCE_PATH_STYLE` environment variable
- When set to "true", configures the S3 client with `force_path_style(true)`
- Added `Config` import from `aws_sdk_s3`

## Why
This enables Convex to work with S3-compatible services like MinIO, LocalStack, and other object storage providers that require path-style addressing (`https://s3.amazonaws.com/bucket/key` instead of `https://bucket.s3.amazonaws.com/key`).

## Testing
- [ ] Existing S3 functionality remains unchanged when environment variable is not set
- [ ] Path-style addressing works when `AWS_S3_FORCE_PATH_STYLE=true` is set
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