The Storage subsystem provides file and blob storage capabilities for the SRE. It handles persistent data storage, file uploads, downloads, and management operations.
Role: Local filesystem storage connector
Summary: Provides file storage capabilities using the local filesystem, suitable for development and single-node deployments.
Setting | Type | Required | Default | Description |
---|---|---|---|---|
folder |
string | No | ~/.smyth/storage |
Directory path for storing files |
Example Configuration:
import { SRE } from '@smythos/sre';
SRE.init({
Storage: {
Connector: 'LocalStorage',
Settings: {
folder: './data/storage',
},
},
});
Use Cases:
Role: Amazon S3 cloud storage connector
Summary: Provides scalable cloud storage using Amazon S3, suitable for production deployments requiring high availability and durability.
Setting | Type | Required | Default | Description |
---|---|---|---|---|
region |
string | Yes | - | AWS region where the bucket is located |
accessKeyId |
string | Yes | - | AWS access key ID |
secretAccessKey |
string | Yes | - | AWS secret access key |
bucket |
string | Yes | - | S3 bucket name for storing files |
Example Configuration:
import { SRE } from '@smythos/sre';
SRE.init({
Storage: {
Connector: 'S3',
Settings: {
region: 'us-east-1',
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
bucket: 'my-app-storage',
},
},
});
Use Cases:
Security Notes: