gatsby-uc / gatsby-plugin-s3

Deploy your gatsby site to a S3 bucket.
https://gatsby-plugin-s3.jari.io/
MIT License
210 stars 110 forks source link

Support `s3ForcePathStyle` in AWS S3 Configuration Options #166

Open shrirambalaji opened 4 years ago

shrirambalaji commented 4 years ago

Currently, in the gatsby-plugin-s3 configuration, I'm not finding a way to set the s3ForcePathStyle option. This is necessary in cases, where S3-Compliant Object Storage Services, which might not be AWS have this path style. Some examples could be Minio

https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Config.html#s3ForcePathStyle-property

Would be happy to send a PR if needed :)

jariz commented 4 years ago

Hi @Shriram-Balaji, this is a volunteer backed project, so a PR would be much appreciated. If not, adding this will likely take a while.

shrirambalaji commented 4 years ago

@jariz cool, I'll send in a PR soon :)

shrirambalaji commented 4 years ago

@jariz Currently, the plugin configuration does not allow passing configOptions directly to the AWS.S3 SDK. We can either, add a standalone s3ForcePathStyle option and use that while initializing the SDK here or add a generic way to support other S3 Configuration Options as well.

I've made a PR, adding just s3ForcePathStyle to the plugin configuration, but the latter option might be an enhancement worth adding later too.