@anymux/s3
v0.1.0
Published
Amazon S3 file system adapter for AnyMux
Downloads
62
Maintainers
Readme
@anymux/s3
Amazon S3 file system and object storage provider for AnyMux.
Installation
pnpm add @anymux/s3Usage
import { S3Provider } from "@anymux/s3";
const provider = new S3Provider({
region: "us-east-1",
bucket: "my-bucket",
credentials: {
accessKeyId: "...",
secretAccessKey: "...",
},
});
await provider.initialize();
// Use as IFileSystem
const fs = provider.getCapability("file-system");
await fs.readFile("/path/to/file.txt", "utf-8");
// Use as IObjectStorage
const storage = provider.getCapability("object-storage");
await storage.putObject({ bucket: "my-bucket", key: "file.txt", body: data });API Overview
S3Provider
Implements IProvider with capabilities:
file-system— FullIFileSysteminterface mapped to S3 objectsobject-storage—IObjectStoragefor bucket and object operations
Configuration
region— AWS regionbucket— Default bucket namecredentials— AWS credentials (access key / secret key)endpoint— Custom endpoint for S3-compatible services (MinIO, etc.)
License
MIT
