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

Bucket endpoint path for S3 #1388

Closed
mkuziemko opened this issue Mar 28, 2019 · 2 comments
Closed

Bucket endpoint path for S3 #1388

mkuziemko opened this issue Mar 28, 2019 · 2 comments
Assignees
Labels
AWS S3 Plugin that handles uploads to Amazon AWS S3 Companion The auth server (for Instagram, GDrive, etc) and upload proxy (for S3) Improvement

Comments

@mkuziemko
Copy link

mkuziemko commented Mar 28, 2019

Hello!

When I set custom S3 endpoint for companion server:
endpoint: 'http://127:0.0.1

It is translate to endpoint:
endpoint: 'http://{bucket}.127:0.0.1

It is possible to add configurable bucket endpoint, like:
endpoint: 'http://127:0.0.1/{bucket}

Thanks for your help.

@mkuziemko mkuziemko changed the title Bucket endpoint path for aws Bucket endpoint path for S3 Mar 28, 2019
@goto-bus-stop
Copy link
Contributor

We pass the endpoint string directly to the AWS SDK's endpoint option. Right now we don't pass through any other options basically.

https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#constructor-property

I think the SDK's way of doing this would be using the s3BucketEndpoint: true option so you could do

endpoint: 'http://127.0.0.1/bucketname',
s3BucketEndpoint: true

So we should maybe spread unknown properties from providerOptions.s3 into the S3 client options here

s3Client = new S3({
region: config.region,
endpoint: config.endpoint,
credentials,
signatureVersion: 'v4'
})

@goto-bus-stop goto-bus-stop added Companion The auth server (for Instagram, GDrive, etc) and upload proxy (for S3) Improvement and removed Triage Feature labels May 20, 2019
@kvz kvz added the AWS S3 Plugin that handles uploads to Amazon AWS S3 label May 29, 2019
@kvz
Copy link
Member

kvz commented May 29, 2019

Hi there, we discussed this with the team and we agree it would be a good idea to allow the s3 options to be configurable. We're going to allow ~all options to be overridden. We don't have an ETA for this yet though, and if someone in the community feels like contributing a PR we would be very grateful!

goto-bus-stop added a commit that referenced this issue Jan 20, 2020
Now you can configure any S3 option listed in
https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#constructor-property.

It adds a warning about the official S3 names `accessKeyId` and
`secretAccessKey` because you should use the Companion-style names `key`
and `secret` instead.
HeavenFox pushed a commit to docsend/uppy that referenced this issue Jun 27, 2023
…ansloadit#2030)

* companion: allow providing any S3 option, closes transloadit#1388

Now you can configure any S3 option listed in
https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#constructor-property.

It adds a warning about the official S3 names `accessKeyId` and
`secretAccessKey` because you should use the Companion-style names `key`
and `secret` instead.

* companion: use awsClientOptions property for Aws SDK config

* companion: also reject keys inside awsClientOptions

* should keep the checks next to each other

* companion: first check if awsClientOptions isnt null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AWS S3 Plugin that handles uploads to Amazon AWS S3 Companion The auth server (for Instagram, GDrive, etc) and upload proxy (for S3) Improvement
Projects
None yet
Development

No branches or pull requests

4 participants