Skip to content

Entity store using AWS S3. Note: *not* for arbitrary binaries, just for Seneca data entities.

License

Notifications You must be signed in to change notification settings

senecajs/seneca-s3-store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Seneca S3 Store

Seneca S3 Store is a plugin for Seneca

Entity store that uses AWS S3. This store can also handle JSONL documents and binary files. This plugin integrates with Seneca Gateway Lambda to support S3 events. A local mode can simulate S3 behaviour for local development and testing.

npm version build Coverage Status Known Vulnerabilities DeepScan grade Maintainability

@seneca/s3-store

Voxgig This open source module is sponsored and supported by Voxgig.

Install

$ npm install @seneca/s3-store

Quick Example

const Seneca = require('seneca')
// import Seneca from 'seneca'

let seneca = Seneca()
  .use('entity', { mem_store: false })
  .use('s3-store', {
    map: {
      'foo': '*' // All 'foo' entity operations
    },
    
    // Settings shared by all S3 Operations
    shared: {
      Bucket: 'my-aws-bucket-name'
    },
    
    // S3 client settings
    s3: {
      Region: 'us-east-1'
    }
  })
  
// Saves the file foo0.json to the bucket.
seneca.entity('foo').save$({id$:'foo0', x:1})

// The file contents will be:
// {"id":"foo0","x":1,"entity$":"-/-/foo"}

More Examples

Motivation

Reference

Options

  • debug : boolean
  • prefix : string
  • suffix : string
  • folder : any
  • s3 : object
  • map : object
  • shared : object
  • local : object
  • ent : object
  • init$ : boolean

Action Patterns

Action Descriptions

Support

Contributing

Background

About

Entity store using AWS S3. Note: *not* for arbitrary binaries, just for Seneca data entities.

Resources

License

Stars

Watchers

Forks

Packages

No packages published