FlowiseAI/Flowise · error · Error

S3 storage configuration is missing

Error message

S3 storage configuration is missing

What it means

Thrown by S3StorageProvider.initS3Config when S3_STORAGE_REGION or S3_STORAGE_BUCKET_NAME is missing or whitespace-only. Both are mandatory; credentials and endpoint URL are optional (allowing public/anonymous or default-chain auth) but region and bucket must be set.

Source

Thrown at packages/components/src/storage/S3StorageProvider.ts:42

    constructor() {
        super()
        const config = this.initS3Config()
        this.s3Client = config.s3Client
        this.bucket = config.bucket
        this.s3Config = config.s3Config
    }

    private initS3Config(): { s3Client: S3Client; bucket: string; s3Config: S3ClientConfig } {
        const accessKeyId = process.env.S3_STORAGE_ACCESS_KEY_ID
        const secretAccessKey = process.env.S3_STORAGE_SECRET_ACCESS_KEY
        const region = process.env.S3_STORAGE_REGION
        const bucket = process.env.S3_STORAGE_BUCKET_NAME
        const customURL = process.env.S3_ENDPOINT_URL
        const forcePathStyle = process.env.S3_FORCE_PATH_STYLE === 'true'

        if (!region || region.trim() === '' || !bucket || bucket.trim() === '') {
            throw new Error('S3 storage configuration is missing')
        }

        const s3Config: S3ClientConfig = {
            region,
            forcePathStyle,
            ...(customURL && customURL.trim() !== '' ? { endpoint: customURL } : {}),
            ...(accessKeyId && accessKeyId.trim() !== '' && secretAccessKey && secretAccessKey.trim() !== ''
                ? { credentials: { accessKeyId, secretAccessKey } }
                : {})
        }

        const s3Client = new S3Client(s3Config)
        return { s3Client, bucket, s3Config }
    }

    getStorageType(): string {
        return 's3'
    }

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Set both S3_STORAGE_REGION and S3_STORAGE_BUCKET_NAME.
  2. If using a custom endpoint (S3_ENDPOINT_URL), still provide region and bucket.
  3. Restart Flowise so initS3Config re-reads the environment.

Example fix

# before
S3_STORAGE_ACCESS_KEY_ID=AKIA...
# after
S3_STORAGE_ACCESS_KEY_ID=AKIA...
S3_STORAGE_SECRET_ACCESS_KEY=...
S3_STORAGE_REGION=us-east-1
S3_STORAGE_BUCKET_NAME=flowise-storage
Defensive patterns

Strategy: validation

Validate before calling

function requireS3Config(): { region: string; bucket: string } {
  const region = process.env.S3_STORAGE_REGION
  const bucket = process.env.S3_STORAGE_BUCKET_NAME
  if (!region || region.trim() === '' || !bucket || bucket.trim() === '') {
    throw new Error('S3 storage configuration is missing')
  }
  return { region: region.trim(), bucket: bucket.trim() }
}

Type guard

function hasS3RegionBucket(env: NodeJS.ProcessEnv): boolean {
  const r = env.S3_STORAGE_REGION, b = env.S3_STORAGE_BUCKET_NAME
  return typeof r === 'string' && r.trim() !== '' && typeof b === 'string' && b.trim() !== ''
}

Prevention

When it happens

Trigger: Selecting S3 storage without setting S3_STORAGE_REGION and S3_STORAGE_BUCKET_NAME, or setting either to a blank value. The guard is `!region || region.trim() === '' || !bucket || bucket.trim() === ''` at S3StorageProvider.ts:41.

Common situations: Incomplete .env; migrating between AWS accounts and forgetting the region; using a custom endpoint but omitting the bucket name.

Related errors


AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12). Data as JSON: /api/errors/16135c46d6705b26. Report an issue: GitHub.