cube-js/cube · error · Error

Unsupported EXPORT_BUCKET_TYPE, supported: ${supportedBucket

Error message

Unsupported EXPORT_BUCKET_TYPE, supported: ${supportedBucketTypes.join(',')}

What it means

The exportBucket configuration's bucketType must be one of the supported S3 export types for Redshift UNLOAD-based exports. If CUBEJS_EXPORT_BUCKET_TYPE (or the config value) is set to something unsupported, the driver throws immediately when building its initial configuration.

Source

Thrown at packages/cubejs-redshift-driver/src/RedshiftDriver.ts:363

      bucketType: getEnv('dbExportBucketType', {
        supported: supportedBucketTypes,
        dataSource,
        preAggregations,
      }),
      bucketName: getEnv('dbExportBucket', { dataSource, preAggregations }),
      region: getEnv('dbExportBucketAwsRegion', { dataSource, preAggregations }),
    };

    const exportBucket: Partial<RedshiftDriverExportAWS> = {
      ...requiredExportBucket,
      keyId: getEnv('dbExportBucketAwsKey', { dataSource, preAggregations }),
      secretKey: getEnv('dbExportBucketAwsSecret', { dataSource, preAggregations }),
      unloadArn: getEnv('redshiftUnloadArn', { dataSource, preAggregations }),
    };

    if (exportBucket.bucketType) {
      if (!supportedBucketTypes.includes(exportBucket.bucketType)) {
        throw new Error(
          `Unsupported EXPORT_BUCKET_TYPE, supported: ${supportedBucketTypes.join(',')}`
        );
      }

      // Make sure the required keys are set
      const emptyRequiredKeys = Object.keys(requiredExportBucket)
        .filter((key: string) => requiredExportBucket[<keyof RedshiftDriverExportRequiredAWS>key] === undefined);
      if (emptyRequiredKeys.length) {
        throw new Error(
          `Unsupported configuration exportBucket, some configuration keys are empty: ${emptyRequiredKeys.join(',')}`
        );
      }
      // If unload ARN is not set, secret and key id must be set for Redshift
      if (!exportBucket.unloadArn) {
        // Make sure the required keys are set
        const emptySecretKeys = Object.keys(exportBucket)
          .filter((key: string) => key !== 'unloadArn')
          .filter((key: string) => exportBucket[<keyof RedshiftDriverExportAWS>key] === undefined);

View on GitHub (pinned to 7d981676b3)

Solutions

  1. Set CUBEJS_EXPORT_BUCKET_TYPE to a supported value for the Redshift driver (e.g. 's3')
  2. Check the driver source for the supportedBucketTypes list and match it exactly (lowercase)
  3. Remove the exportBucket config if UNLOAD-based CSV export is not needed

Example fix

// before
CUBEJS_EXPORT_BUCKET_TYPE=gcs
// after
CUBEJS_EXPORT_BUCKET_TYPE=s3
Defensive patterns

Strategy: validation

Validate before calling

const supported = ['s3'];
const type = process.env.CUBEJS_EXPORT_BUCKET_TYPE;
if (type && !supported.includes(type)) {
  throw new Error(`CUBEJS_EXPORT_BUCKET_TYPE must be one of: ${supported.join(',')}`);
}

Prevention

When it happens

Trigger: getExportBucket (invoked from getInitialConfiguration) sees exportBucket.bucketType set to a value not in supportedBucketTypes — e.g. a typo like 's3-gcp' or 'S3' instead of 's3'.

Common situations: Typo in CUBEJS_EXPORT_BUCKET_TYPE env var; copying exportBucket config from another driver (e.g. BigQuery/Snowflake) whose bucket types differ from Redshift's.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02). Data as JSON: /api/errors/f4696656707f2bdc. Report an issue: GitHub.