@shcallaway/ez-s3

Simple module for reading from and writing to S3.

Usage no npm install needed!

<script type="module">
  import shcallawayEzS3 from 'https://cdn.skypack.dev/@shcallaway/ez-s3';
</script>

README

Easy S3

Simple module for reading from and writing to S3.

Usage

Download an object to memory:

client
.download('my-bucket', 'my-object')
.then(data => {});

Download an object to drive:

client
.download('my-bucket', 'my-object', true)
.then(data => {});

Upload a new object:

client.upload('my-bucket', 'new-file.txt', 'hello world');

Append data to an existing object:

client.append('my-bucket', 'my-object', 'hello world');

Authorization

This module assumes you have configured the AWS CLI on the host machine.

Installation

  1. Download: npm install @shcallaway/ez-s3 --save
  2. Require: const EasyS3 = require('ez-s3)
  3. Instantiate: const client = new EasyS3();