transloadit/uppy · critical · Error

The S3 client is not configured on this companion instance.

Error message

The S3 client is not configured on this companion instance.

What it means

#uploadS3Multipart requires server-side S3 credentials. If this.options.s3 is falsy (no S3 client was configured on this Companion instance), it throws 'The S3 client is not configured on this companion instance.' before attempting any AWS calls.

Source

Thrown at packages/@uppy/companion/src/server/Uploader.ts:892

            : 'Request failed'
        throw Object.assign(new Error(statusMessage), {
          extraData: getRespObj(response as unknown as Response<string>),
        })
      }

      throw new Error('Unknown multipart upload error', { cause: err })
    }
  }

  /**
   * Upload the file to S3 using a Multipart upload.
   */
  async #uploadS3Multipart(
    stream: NodeReadableStream,
    req: Request,
  ): Promise<UploadResult> {
    if (!this.options.s3) {
      throw new Error(
        'The S3 client is not configured on this companion instance.',
      )
    }

    const filename = this.uploadFileName
    const s3Options = this.options.s3
    const { metadata } = this
    const { client, options } = s3Options

    const params: PutObjectCommandInput = {
      Bucket: getBucket({
        bucketOrFn: options.bucket,
        req,
        metadata,
        filename,
      }),
      Key: options.getKey({ req, filename, metadata }),
      ContentType: metadata.type,

View on GitHub (pinned to 5d4dedd02a)

Solutions

  1. Configure S3 on Companion: set AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_AWS_BUCKET (bucket), and AWS_REGION env vars, or pass the s3 option programmatically
  2. Restart Companion after adding the variables and confirm they are visible in its environment (e.g. docker-compose env)

Example fix

# before
compainon: # no S3 vars -> error on s3Multipart uploads

# after (docker-compose)
environment:
  - AWS_ACCESS_KEY_ID=AKIA...
  - AWS_SECRET_ACCESS_KEY=...
  - AWS_AWS_BUCKET=my-bucket
  - AWS_REGION=us-east-1
Defensive patterns

Strategy: validation

Validate before calling

const s3Configured = Boolean(process.env.AWS_ACCESS_KEY_ID && process.env.AWS_SECRET_ACCESS_KEY && process.env.AWS_AWS_BUCKET && process.env.AWS_REGION)
if (protocol === 's3Multipart' && !s3Configured) throw new Error('S3 not configured on server')

Try / catch

try { await upload() } catch (err) {
  if (err.message.includes('S3 client is not configured')) { /* fall back to multipart protocol with an endpoint */ }
}

Prevention

When it happens

Trigger: Client requests protocol 's3Multipart' but Companion was started without AWS S3 config (missing AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY or s3 option), so options.s3 is undefined.

Common situations: Forgetting to set the four required S3 env vars (key, secret, bucket, region), or expecting the client-side protocol choice alone to enable S3 uploads.

Related errors


AI-assisted analysis of transloadit/uppy@5d4dedd02a (2026-08-28). Data as JSON: /api/errors/769532c0d5172eac. Report an issue: GitHub.