@seneca/s3-store
TypeScript icon, indicating that this package has built-in type declarations

2.4.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @seneca/s3-store

Weekly Downloads

17

Version

2.4.0

License

MIT

Unpacked Size

49.3 kB

Total Files

7

Last publish

Collaborators

  • lmscunha
  • alex01
  • lilsweetcaligula
  • stokesriona
  • rjrodger