Skip to content
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

s3_media_upload non-AWS #34

Closed
HarHarLinks opened this issue Apr 4, 2020 · 1 comment
Closed

s3_media_upload non-AWS #34

HarHarLinks opened this issue Apr 4, 2020 · 1 comment

Comments

@HarHarLinks
Copy link

The s3_media_upload script suffers from a handful shortcomings that stem from - in contrast to the s3_storage_provider.py module - not inheriting the homeserver config.

Especially the trouble is that the default boto3 client instantiation somehow gets the region (from .aws/config default s3 maybe?) but not the complete URL/domain part - i.e. if you use something other that AWS, synapse will respect that but the upload script won't.

My suggestion is to instead of creating a custom database.yaml config file, to just read the homeserver.yaml instead (or worse, copy all relevant fields into it's own config).
Then parse everything relevant, e.g. endpoint_url to this:

s3 = boto3.client("s3")

@richvdh
Copy link
Member

richvdh commented May 13, 2020

Especially the trouble is that the default boto3 client instantiation somehow gets the region (from .aws/config default s3 maybe?) but not the complete URL/domain part - i.e. if you use something other that AWS, synapse will respect that but the upload script won't.

this sounds like a duplicate of #25.

@richvdh richvdh closed this as completed May 13, 2020
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

No branches or pull requests

2 participants