Open-Source Wikis

/

MinIO

/

Systems

/

Object Lambda

minio/minio

Object Lambda

MinIO's Object Lambda support intercepts a GetObject call and forwards the response through an external "lambda" function before it reaches the client. This is the AWS S3 Object Lambda feature, but pluggable across function backends.

Purpose

  • Run request-time transforms (redact PII, watermark, transcode) without a separate proxy.
  • Reuse the same function backend for many buckets/users.

Layout

cmd/
├── object-lambda-handlers.go   # GetObject lambda passthrough
internal/config/lambda/
├── target/                     # Per-target adapters
└── ...

Key abstractions

Symbol File What it is
Object Lambda handler cmd/object-lambda-handlers.go Wraps GetObject to call the external function.
Lambda target internal/config/lambda/target/ HTTP target (others can be added).

How it works

graph LR
    CLIENT[GetObject] --> H[handler]
    H --> READ[Read source object]
    READ --> POST[POST to lambda target]
    POST --> FN[External function]
    FN --> RESP[Transformed response]
    RESP --> CLIENT

The function receives an HTTP POST with the object payload (or a presigned URL to fetch it) and returns the transformed response, which the handler streams back to the client. Configuration is via the standard config system (MINIO_LAMBDA_* env vars).

Integration points

  • Source side: cmd/object-handlers.go GetObject checks for an attached lambda and re-routes to cmd/object-lambda-handlers.go.
  • Target adapters live alongside the notification adapters (different package, similar shape).

Entry points for modification

  • New target type. Add an adapter under internal/config/lambda/target/.
  • Per-bucket binding. The mapping from bucket → lambda target lives in bucket metadata; extending it requires touching cmd/bucket-metadata.go.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Object Lambda – MinIO wiki | Factory