Amazon S3 Plugin
The Amazon S3 plugin (tika-pipes-s3) provides fetcher, emitter, and iterator interfaces for objects in S3 (or any S3-compatible service such as MinIO).
| Interface | Component name | Class |
|---|---|---|
Fetcher |
|
|
Emitter |
|
|
Iterator |
|
|
Credentials
All three components share the same credentialsProvider selector:
-
profile— reads credentials from the local AWS profile named byprofile(e.g.,default). -
instance— uses the IAM role of the EC2 instance the host runs on, read from the instance metadata service. No additional fields needed. -
web_identity— assumes a role with a web identity token, as EKS IAM roles for service accounts (IRSA) provide. Reads the role fromAWS_ROLE_ARNand the token fromAWS_WEB_IDENTITY_TOKEN_FILE, which EKS sets on the pod. No additional fields needed. -
key_secret— readsaccessKeyandsecretKeyfrom the config. Avoid checking these into source control; prefer environment-variable substitution or one of the other providers.
All three components reject any other value when they are created. If credentialsProvider is unset, the emitter’s validate() rejects it, but the fetcher and iterator fall back to instance.
ECS task roles and EKS Pod Identity are not supported — neither instance nor web_identity picks them up.
S3 Fetcher (s3-fetcher)
Reads objects from an S3 bucket. The fetch key is the S3 key under prefix (if set).
{
"fetchers": {
"s3f": {
"s3-fetcher": {
"bucket": "my-tika-input",
"region": "us-east-1",
"prefix": "incoming/",
"credentialsProvider": "profile",
"profile": "default",
"extractUserMetadata": true,
"spoolToTemp": true
}
}
}
}
Configuration
| Field | Default | Description |
|---|---|---|
|
required |
S3 bucket name. |
|
required |
AWS region (e.g., |
|
none |
Optional key prefix, prepended verbatim to the fetch key — include the trailing |
|
|
One of |
|
conditional |
Required by the matching |
|
|
If |
|
|
If |
|
|
Maximum HTTP connections in the S3 client pool. |
|
|
Maximum object size, in bytes. |
|
none |
Custom S3 endpoint, for S3-compatible services such as MinIO or LocalStack. |
|
|
Force path-style URLs (e.g., |
|
none |
Retry/back-off array. Its length is the number of attempts, and entry i is the seconds to sleep before retry i. Absent means a single attempt with no retry. |
S3 Emitter (s3-emitter)
Writes parsed results back to an S3 bucket. The emit key (relative to prefix) is derived from the FetchEmitTuple.
{
"emitters": {
"s3e": {
"s3-emitter": {
"bucket": "my-tika-output",
"region": "us-east-1",
"prefix": "results/",
"fileExtension": "json",
"credentialsProvider": "profile",
"profile": "default"
}
}
}
}
Configuration
| Field | Default | Description |
|---|---|---|
|
required |
Destination S3 bucket name (validated non-blank). |
|
required |
AWS region (validated non-blank). |
|
required |
One of |
|
conditional |
Required by the matching |
|
none |
Optional key prefix. A trailing |
|
|
Extension appended to each emitted key. Set it to |
|
|
If |
|
|
Maximum HTTP connections in the S3 client pool. The value goes straight to the underlying connection manager, which rejects |
|
none |
Custom S3 endpoint, for S3-compatible services. |
|
|
Force path-style URLs. |
S3 Iterator (s3-pipes-iterator)
Lists objects under a bucket/prefix and emits one FetchEmitTuple per object found.
{
"pipes-iterator": {
"s3-pipes-iterator": {
"bucket": "my-tika-input",
"region": "us-east-1",
"prefix": "incoming/",
"credentialsProvider": "profile",
"profile": "default",
"fetcherId": "s3f",
"emitterId": "s3e"
}
}
}
Configuration
In addition to the required fetcherId / emitterId (see Wiring an Iterator):
| Field | Default | Description |
|---|---|---|
|
required |
S3 bucket to enumerate. |
|
required |
AWS region. |
|
|
Key prefix to scope the listing. |
|
|
One of |
|
conditional |
Auth fields, mirroring the fetcher and emitter. |
|
none |
Optional regex, applied with |
|
|
Maximum HTTP connections in the S3 client pool. |
|
|
Force path-style URLs. |
Complete Pipeline Example
Fetcher, emitter, and iterator wired to list s3://my-tika-input/incoming/ and write results to s3://my-tika-output/results/.
{
"content-handler-factory": {
"basic-content-handler-factory": {
"type": "TEXT",
"writeLimit": -1,
"throwOnWriteLimitReached": true
}
},
"fetchers": {
"s3f": {
"s3-fetcher": {
"bucket": "my-tika-input",
"region": "us-east-1",
"credentialsProvider": "profile",
"profile": "default",
"extractUserMetadata": true
}
}
},
"emitters": {
"s3e": {
"s3-emitter": {
"bucket": "my-tika-output",
"region": "us-east-1",
"prefix": "results/",
"fileExtension": "json",
"credentialsProvider": "profile",
"profile": "default"
}
}
},
"pipes-iterator": {
"s3-pipes-iterator": {
"bucket": "my-tika-input",
"region": "us-east-1",
"prefix": "incoming/",
"credentialsProvider": "profile",
"profile": "default",
"fetcherId": "s3f",
"emitterId": "s3e"
}
},
"pipes": {
"parseMode": "RMETA",
"onParseException": "EMIT",
"numClients": 4
}
}
|
The iterator’s Set the prefix on exactly one side: on the iterator (and leave the fetcher’s unset), as the
example above does, or on
the fetcher when fetch keys come from somewhere that emits bare names. The emitter’s
|
Notes
-
The fetcher, emitter, and iterator each maintain their own S3 client. Auth and endpoint settings need to be configured per component, not globally.
-
The S3 SDK enforces TLS 1.2+ by default; in-flight encryption is on. For at-rest encryption, configure bucket-level SSE on the AWS side.
-
When using
endpointConfigurationServiceagainst MinIO or LocalStack, you almost always needpathStyleAccessEnabled: true.