fortknox

An Enhancement Wrapper around knox the AWS s3 module

FortKnox

Enhancement methods to Knox the AWS s3 module, with these methods you can create a bucket, remove a bucket, create a website and activate a standard website policy.

npm install fortknox

Fort Knox supports all methods that knox supports and adds the following methods:

  • createBucket
  • deleteBucket
  • createWebsite
  • deleteWebsite
  • enablePolicy
  • disablePolicy

fortknox.createBucket builds a new bucket based on your client options.

fortknox = require 'fortknox'
 
client = fortknox.createClient
  key: 'FOO'
  secret: 'BAR'
  bucket: 'www.foobar.com'
 
client.createBucket (err, resp) -> console.log resp.statusCode

fortknox.deleteBucket removes a bucket based on your client options.

fortknox = require 'fortknox'
 
client = fortknox.createClient
  key: 'FOO'
  secret: 'BAR'
  bucket: 'www.foobar.com'
 
client.deleteBucket (err, resp) -> console.log resp.statusCode

fortknox.createWebSite convert bucket into a website.

fortknox = require 'fortknox'
 
client = fortknox.createClient
  key: 'FOO'
  secret: 'BAR'
  bucket: 'www.foobar.com'
 
client.createWebSite (err, resp) -> console.log resp.statusCode

fortknox.deleteWebSite remove website config from a bucket.

fortknox = require 'fortknox'
 
client = fortknox.deleteWebSite
  key: 'FOO'
  secret: 'BAR'
  bucket: 'www.foobar.com'
 
client.deleteWebSite (err, resp) -> console.log resp.statusCode

fortknox.activatePolicy activate policy config from a bucket.

fortknox = require 'fortknox'
 
client = fortknox.activatePolicy
  key: 'FOO'
  secret: 'BAR'
  bucket: 'www.foobar.com'
 
client.activatePolicy (err, resp) -> console.log resp.statusCode

fortknox.deactivatePolicy activate policy config from a bucket.

fortknox = require 'fortknox'
 
client = fortknox.deactivatePolicy
  key: 'FOO'
  secret: 'BAR'
  bucket: 'www.foobar.com'
 
client.deactivatePolicy (err, resp) -> console.log resp.statusCode
npm test

Pull Requests welcome!

see LICENSE