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

Connecting directly to Amazon S3 #47

Open
vaidab opened this issue Jan 2, 2025 · 5 comments
Open

Connecting directly to Amazon S3 #47

vaidab opened this issue Jan 2, 2025 · 5 comments

Comments

@vaidab
Copy link

vaidab commented Jan 2, 2025

It seems the codebase already supports this, but it hard encodes digitaloceanspaces.
Would love to have a direct S3 integration.

@stephengpope
Copy link
Owner

we'll take a look, thanks.

@stephengpope
Copy link
Owner

@vaidab we took a look and it should work, can you provide us the error you're getting?

we do hard code digitalocean spaces in the code but its in a comment.

# S3 (DigitalOcean Spaces) environment variables

@vaidab
Copy link
Author

vaidab commented Jan 3, 2025

It's encoded in services/s3_toolkit.py

endpoint_url = f"https://{region}.digitaloceanspaces.com"

It can be easily moved in an environment variable.

INFO:routes.v1.toolkit.test:Job f45dac3b-d63b-4a10-b0f6-275e842f169a: Testing NCA Toolkit API setup
INFO:services.cloud_storage:Uploading file to cloud storage: /tmp/success.txt
ERROR:services.s3_toolkit:Error uploading file to S3: Could not connect to the endpoint URL: "https://us-east-1.digitaloceanspaces.com/s3/success.txt"
ERROR:services.cloud_storage:Error uploading file to cloud storage: Could not connect to the endpoint URL: "https://us-east-1.digitaloceanspaces.com/s3/success.txt"
ERROR:routes.v1.toolkit.test:Job f45dac3b-d63b-4a10-b0f6-275e842f169a: Error testing API setup - Could not connect to the endpoint URL: "https://us-east-1.digitaloceanspaces.com/s3/success.txt"
INFO:routes.v1.toolkit.test:Job d5c9ad6a-0b9a-47c3-b3c9-ca4ff7eb34fc: Testing NCA Toolkit API setup
INFO:services.cloud_storage:Uploading file to cloud storage: /tmp/success.txt

@tmatei
Copy link

tmatei commented Feb 5, 2025

I'm running into the same issue. @stephengpope would you be able to change it? I'd love to use R2 from cloudflare instead of digital ocean spaces.

@stephengpope
Copy link
Owner

@vaidab @tmatei we have a fix coming in the next couple days that will address it, thanks for letting us know!

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

3 participants