{"record":{"id":"16135c46d6705b26","repo":"FlowiseAI/Flowise","slug":"s3-storage-configuration-is-missing","errorCode":null,"errorMessage":"S3 storage configuration is missing","messagePattern":"S3 storage configuration is missing","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/src/storage/S3StorageProvider.ts","lineNumber":42,"sourceCode":"\n    constructor() {\n        super()\n        const config = this.initS3Config()\n        this.s3Client = config.s3Client\n        this.bucket = config.bucket\n        this.s3Config = config.s3Config\n    }\n\n    private initS3Config(): { s3Client: S3Client; bucket: string; s3Config: S3ClientConfig } {\n        const accessKeyId = process.env.S3_STORAGE_ACCESS_KEY_ID\n        const secretAccessKey = process.env.S3_STORAGE_SECRET_ACCESS_KEY\n        const region = process.env.S3_STORAGE_REGION\n        const bucket = process.env.S3_STORAGE_BUCKET_NAME\n        const customURL = process.env.S3_ENDPOINT_URL\n        const forcePathStyle = process.env.S3_FORCE_PATH_STYLE === 'true'\n\n        if (!region || region.trim() === '' || !bucket || bucket.trim() === '') {\n            throw new Error('S3 storage configuration is missing')\n        }\n\n        const s3Config: S3ClientConfig = {\n            region,\n            forcePathStyle,\n            ...(customURL && customURL.trim() !== '' ? { endpoint: customURL } : {}),\n            ...(accessKeyId && accessKeyId.trim() !== '' && secretAccessKey && secretAccessKey.trim() !== ''\n                ? { credentials: { accessKeyId, secretAccessKey } }\n                : {})\n        }\n\n        const s3Client = new S3Client(s3Config)\n        return { s3Client, bucket, s3Config }\n    }\n\n    getStorageType(): string {\n        return 's3'\n    }","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/src/storage/S3StorageProvider.ts#L24-L60","documentation":"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.","triggerScenarios":"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.","commonSituations":"Incomplete .env; migrating between AWS accounts and forgetting the region; using a custom endpoint but omitting the bucket name.","solutions":["Set both S3_STORAGE_REGION and S3_STORAGE_BUCKET_NAME.","If using a custom endpoint (S3_ENDPOINT_URL), still provide region and bucket.","Restart Flowise so initS3Config re-reads the environment."],"exampleFix":"# before\nS3_STORAGE_ACCESS_KEY_ID=AKIA...\n# after\nS3_STORAGE_ACCESS_KEY_ID=AKIA...\nS3_STORAGE_SECRET_ACCESS_KEY=...\nS3_STORAGE_REGION=us-east-1\nS3_STORAGE_BUCKET_NAME=flowise-storage","handlingStrategy":"validation","validationCode":"function requireS3Config(): { region: string; bucket: string } {\n  const region = process.env.S3_STORAGE_REGION\n  const bucket = process.env.S3_STORAGE_BUCKET_NAME\n  if (!region || region.trim() === '' || !bucket || bucket.trim() === '') {\n    throw new Error('S3 storage configuration is missing')\n  }\n  return { region: region.trim(), bucket: bucket.trim() }\n}","typeGuard":"function hasS3RegionBucket(env: NodeJS.ProcessEnv): boolean {\n  const r = env.S3_STORAGE_REGION, b = env.S3_STORAGE_BUCKET_NAME\n  return typeof r === 'string' && r.trim() !== '' && typeof b === 'string' && b.trim() !== ''\n}","tryCatchPattern":null,"preventionTips":["Always set S3_STORAGE_REGION and S3_STORAGE_BUCKET_NAME.","Provide credentials unless relying on the default credential chain.","Validate S3 env vars at startup."],"tags":["aws","s3","storage","env","configuration"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}