Esc
Documentation
On this page

The S3 adapter works with AWS S3 and with any storage that speaks the S3 API, such as MinIO. It has a single connection method, so you don’t set method.

Add an S3 service#

Declare the adapter and the service in dsui.yaml:

yaml
adapters:
  s3:
    source: git
    repository: "git+https://github.com/northgraindata/dsui"
    path: packages/adapter-s3

services:
  - id: files
    adapter: s3
    name: Data lake
    connection:
      region: eu-west-1
      accessKeyId: ${AWS_ACCESS_KEY_ID}
      secretAccessKey: ${AWS_SECRET_ACCESS_KEY}

For MinIO or another compatible store, add the store’s endpoint and turn on forcePathStyle:

yaml
connection:
  endpoint: http://minio:9000
  forcePathStyle: true
  accessKeyId: ${MINIO_ACCESS_KEY}
  secretAccessKey: ${MINIO_SECRET_KEY}

See connect a service for how credentials work.

Connection fields#

FieldRequiredDefaultMeaning
accessKeyIdYesAccess key ID
secretAccessKeyYesSecret access key
regionNous-east-1Region of your buckets
endpointNoAWSURL of an S3-compatible store. Leave it out for AWS S3
forcePathStyleNofalsePut the bucket name in the URL path instead of the host name. Turn it on for MinIO
publicEndpointNoThe endpointURL that browsers use to reach the store. DSUI signs download links against it

Set publicEndpoint when endpoint is an address that only DSUI can reach, such as http://minio:9000 inside a Compose network, and your browser needs a different address to download files.

What you can do#

  • Buckets: list your buckets and see each bucket’s versioning, encryption, policy, object count, and size
  • Browse: open folders, see an object’s size, type, storage class, metadata, tags, and versions, and preview text and images
  • Change: upload objects, create folders, copy objects, and delete objects
  • Share and download: create a presigned download link that is valid from 60 seconds up to 7 days, and download a folder as a ZIP file
  • Activity: review the actions that DSUI ran against the store

Signals#

  • object-uploaded: emitted after an upload. The payload holds the bucket, the key, the content type, and the size in bytes
  • objects-deleted: emitted after a delete. The payload holds the bucket, the keys, and the number of deleted objects

Use with a DSUI Agent#

The S3 adapter doesn’t read the proxy variables that DSUI sets for a DSUI Agent, so a store in a private network isn’t verified to work through an agent. See private networks.