AWS S3 adapter for AnyFS
var AnyFS = require('anyfs');
var Adapter = require('anyfs-s3-adapter');
var adapter = new Adapter({
"accessKeyId": "AWS access key",
"secretAccessKey": "AWS secret",
"region": "S3 region",
"bucket": "S3 bucket"
});
var fs = new AnyFS(adapter);
fs.list('/dir', function(err, list) {
console.log(list);
});
Create .secret.json
with credentials of your AWS S3 bucket:
{
"accessKeyId": "AWS access key",
"secretAccessKey": "AWS secret",
"region": "S3 region",
"bucket": "S3 bucket"
}
Then run:
npm install
npm test