Text Storage
Generator can be configured to store parsed text content in an S3 bucket for archival or external processing purposes.
This feature is controlled by the IMPORT__TEXT_OBJECT_STORE setting, which accepts a JSON object with the following schema:
| Field | Type | Default | Description |
|---|---|---|---|
| enabled | bool | False | Whether Generator should store text in an S3 bucket. |
| format | TextFormat | TextFormat.JSON | The format to use when serializing the text for storage. |
| s3_location | S3Location (optional) | None | The S3 location to use when storing text in an S3 bucket. |
Properties of S3Location:
| Field | Type | Description |
|---|---|---|
| bucket | str | The name of the S3 bucket where text should be stored. |
| region | str (optional) | AWS region name (e.g., ‘us-east-1’). If omitted, the AWS SDK will use the default configured region. |
| access_key_id | str (optional) | AWS access key ID. If omitted, credentials will be resolved via the standard AWS provider chain. |
| secret_access_key | str (optional) | AWS secret access key. Required if access_key_id is provided manually. |
| session_token | str (optional) | AWS session token for temporary security credentials. |
Values of TextFormat:
| Value |
|---|
| text |
| json |
| vtt |
To specify where in the bucket that Generator should save the course text, you should set the object_store_text_path_override property on any import request to the intended path (relative to the bucket).
For example, if your object store is configured like this:
{
"value": {
"enabled": true,
"format": "json",
"s3_location": {
"bucket": "my-text-bucket"
}
}
}
Then specifying "object_store_text_path_override": "generator/text/file.json" on the import request will result in the course text being saved to s3://my-text-bucket/generator/text/file.json