Custom S3 Provider

As I‘m still struggling with my S3 configuration with IONOS/Profitbricks I think it would be good to have a list of custom S3 Providers which were tested by the members of the community that work without CORS issues.

What services other than AWS and Digital Ocean were tested without CORS issues for private buckets?

I have used Scaleway succesfully but I had to change some Wappler files as they have hard-coded the region to “us-east-1” and some providers don’t accept that.

Do you remember which files and what you changed?

Yup. I changed in the app.js file the region string to the custom one for scaleway.

setS3Provider: function (name, options) {
    const AWS = require('aws-sdk');
    const endpoint = new AWS.Endpoint(this.parseRequired(options.endpoint, 'string', 's3.provider: endpoint is required.'));
    const accessKeyId = this.parseRequired(options.accessKeyId, 'string', 's3.provider: accessKeyId is required.');
    const secretAccessKey = this.parseRequired(options.secretAccessKey, 'string', 's3.provider: secretAccessKey is required.');

    let region = 'fr-par';
    let pos = options.endpoint.indexOf('.amazonaws');
    if (pos > 3) region = options.endpoint.substr(3, pos - 3);

    this.s3[name] = new AWS.S3({ endpoint, accessKeyId, secretAccessKey, region, signatureVersion: 'v4' });

    return this.s3[name];
  },

The file gets overwritten quite often so you need to take that into account.

1 Like