FS and S3/AMQP Locations
Status: Work In Progress This page is currently being drafted and should be reviewed.
This page documents the fs and s3_amqp location types used by the Databox indexer.
Terminology (code-aligned)
- Location type
fs: local filesystem source. - Location type
s3_amqp: S3 events consumed from AMQP queue. - Main commands:
index <location-name>watchlist
- Optional command:
index-all(batch run on all configured locations)
fs location
Purpose
Import files from a local directory into Databox and keep Databox synchronized with filesystem changes.
Required options
workspaceSlugdir
Optional options
dirPrefixsourceDir
Example
{
"name": "my_fs",
"type": "fs",
"options": {
"dir": "%env(WATCH_DIR)%",
"dirPrefix": "%env(WATCH_DIR_PREFIX)%",
"sourceDir": "%env(WATCH_SOURCE_DIR)%",
"workspaceSlug": "%env(DATABOX_WORKSPACE_SLUG)%"
},
"alternateUrls": [
{
"name": "indexer",
"pathPattern": "indexer://${sourcePath}"
}
]
}
Runtime behavior
index <location-name>:- scans source entries
- creates/updates assets and files in Databox
watchforfs:- listens for file events
addtriggers create/update flowunlinktriggers delete flow
s3_amqp location
Purpose
Consume S3 object events from AMQP and apply create/delete synchronization in Databox.
Required options
workspaceSlugamqp.dsns3.endpoints3.bucketNamess3.accessKeys3.secretKey
Example
{
"name": "test-s3",
"type": "s3_amqp",
"options": {
"amqp": {
"dsn": "%env(AMQP_DSN)%"
},
"s3": {
"endpoint": "%env(S3_ENDPOINT)%",
"bucketNames": "%env(BUCKET_NAMES)%",
"accessKey": "%env(S3_ACCESS_KEY)%",
"secretKey": "%env(S3_SECRET_KEY)%"
},
"workspaceSlug": "%env(DATABOX_WORKSPACE_SLUG)%"
}
}
Runtime behavior
index <location-name>:- consumes iterator-based source flow and indexes assets
watchfors3_amqp:- listens to AMQP queue
s3events - handles creation events:
s3:ObjectCreated:Puts3:ObjectCreated:Posts3:ObjectCreated:CompleteMultipartUploads3:ObjectCreated:Copy
- handles deletion event:
s3:ObjectRemoved:Delete
- listens to AMQP queue
Operational notes
- Keep
workspaceSlugstable for a given location, otherwise idempotence can break. - Ensure bucket list and path filters are correct before enabling
watch. - Do not store raw credentials in committed config files; use environment variables.