0.9.19 • Published 4 years ago

atma-io-transport-s3 v0.9.19

Weekly downloads
6
License
-
Repository
github
Last release
4 years ago

AWS S3 and AWS S3 compatible transport for atma-io.

Build Status NPM version

The plugin adds s3:// protocol support to atma-io library.

's3://BUCKET/PATH'

Only ASYNC api is supported

await io.File.writeAsync('s3://mybucket/foo/bar.txt', 'Lorem ipsum');

let content = await io.File.readAsync('s3://mybucket/foo/bar.txt');

await io.File.copyTo('./localfile.txt', 's3://mybucket/remotefile.txt');

See the atma-io API for File and Directory. Sync methods are not supported, and exceptions will be thrown.

Get started

  1. When atma toolkit, atma server, app-bundler are used, you just have to enable and configurate the plugin in package.json:
{
    // package.json options
    "atma": {
        "plugins": [
            "atma-io-transport-s3"
        ],
        "options": {
            "atma-io-transport-s3": {
                // OPTIONALY HERE the settings but better via ENV 
                "accessKeyId": "",
                "secretAccessKey": "",
                "region": "",
                "endpoint": "",
                "sslEnabled": "",
            }
        }
    }
}

ENV:

process.env.AWS_KEY;
process.env.AWS_SECRET;
process.env.AWS_REGION;
process.env.AWS_ENDPOINT;
'AWS_SSL' in process.env;

No further configuration or registration is required. Just use the s3 protocol.

  1. Configurate and register manually
import { File } from 'atma-io'
import Transport from 'atma-io-transport-s3'

Transport.init(File, { /* aws options or ENV will be read */ });

After that you can use s3 protocol in the application.


(c) MIT - Atma.js Project

0.9.19

4 years ago

0.9.18

4 years ago

0.9.17

5 years ago

0.9.16

5 years ago

0.9.15

5 years ago

0.9.14

5 years ago

0.9.13

5 years ago

0.9.12

5 years ago

0.9.9

5 years ago

0.9.8

5 years ago

0.9.7

5 years ago

0.9.6

5 years ago

0.9.5

5 years ago

0.9.4

5 years ago

0.9.3

5 years ago

0.9.2

5 years ago

0.0.1-security

5 years ago