@robinpath/s3
v0.1.4
Published
S3-compatible object storage operations using AWS Signature V4 over HTTPS
Downloads
475
Readme
@robinpath/s3
S3-compatible object storage operations using AWS SDK
Why use this module?
The s3 module lets you:
- Upload an object to S3
- Download an object from S3
- Delete an object from S3
- List objects in an S3 bucket
- Check if an object exists in S3
All functions are callable directly from RobinPath scripts with a simple, consistent API.
Installation
npm install @robinpath/s3Quick Start
1. Set up credentials
s3.configure "your-credentials"2. Upload an object to S3
s3.uploadAvailable Functions
| Function | Description |
|----------|-------------|
| s3.configure | Configure S3 client credentials and endpoint |
| s3.upload | Upload an object to S3 |
| s3.download | Download an object from S3 |
| s3.remove | Delete an object from S3 |
| s3.list | List objects in an S3 bucket |
| s3.exists | Check if an object exists in S3 |
| s3.copy | Copy an object within or between S3 buckets |
| s3.move | Move an object (copy then delete source) |
| s3.presignUrl | Generate a presigned URL for an S3 object |
| s3.createBucket | Create a new S3 bucket |
| s3.deleteBucket | Delete an S3 bucket |
| s3.listBuckets | List all S3 buckets |
| s3.getMetadata | Get metadata for an S3 object |
| s3.setAcl | Set the ACL for an S3 object |
Examples
Upload an object to S3
s3.uploadDownload an object from S3
s3.downloadDelete an object from S3
s3.removeIntegration with RobinPath
import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/s3";
const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);
const result = await rp.executeScript(`
s3.configure "your-credentials"
s3.upload
`);Full API Reference
See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.
Related Modules
@robinpath/dropbox— Dropbox module for complementary functionality@robinpath/box— Box module for complementary functionality@robinpath/onedrive— OneDrive module for complementary functionality@robinpath/google-drive— Google Drive module for complementary functionality@robinpath/json— JSON module for complementary functionality
License
MIT
