All Projects → apiaryio → S3 Streaming Upload

apiaryio / S3 Streaming Upload

Licence: mit
s3-streaming-upload is node.js library that listens to your stream and upload its data to Amazon S3 using ManagedUpload API.

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to S3 Streaming Upload

Runbook
A framework for gradual system automation
Stars: ✭ 531 (+353.85%)
Mutual labels:  sre
Turbine Ec2
Turbine Instance Discovery based on EC2 tags
Stars: ✭ 26 (-77.78%)
Mutual labels:  sre
Prometheus Slo Burn Example
An end to end example of implementing SLOs with prometheus, grafana and Go.
Stars: ✭ 73 (-37.61%)
Mutual labels:  sre
Jaeger Ui
Web UI for Jaeger
Stars: ✭ 639 (+446.15%)
Mutual labels:  sre
Black Belt
Internal toolbelt on steroids (idle since September 2018)
Stars: ✭ 6 (-94.87%)
Mutual labels:  sre
Kapo
Wrap any command in a status socket
Stars: ✭ 45 (-61.54%)
Mutual labels:  sre
Howtheysre
A curated collection of publicly available resources on how technology and tech-savvy organizations around the world practice Site Reliability Engineering (SRE)
Stars: ✭ 6,962 (+5850.43%)
Mutual labels:  sre
Jnitrace Engine
Engine used by jnitrace to intercept JNI API calls.
Stars: ✭ 94 (-19.66%)
Mutual labels:  sre
Postgresql exporter
A Prometheus exporter for some postgresql metrics
Stars: ✭ 26 (-77.78%)
Mutual labels:  sre
Skinny
The Skinny Distributed Lock Service
Stars: ✭ 70 (-40.17%)
Mutual labels:  sre
Awesome Sre
A curated list of Site Reliability and Production Engineering resources.
Stars: ✭ 7,687 (+6470.09%)
Mutual labels:  sre
Ops doc
运维简洁实用手册
Stars: ✭ 819 (+600%)
Mutual labels:  sre
Devops Exercises
Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network, Virtualization. DevOps Interview Questions
Stars: ✭ 20,905 (+17767.52%)
Mutual labels:  sre
Jnitrace
A Frida based tool that traces usage of the JNI API in Android apps.
Stars: ✭ 534 (+356.41%)
Mutual labels:  sre
Cloudprober
An active monitoring software to detect failures before your customers do.
Stars: ✭ 1,269 (+984.62%)
Mutual labels:  sre
School Of Sre
At LinkedIn, we are using this curriculum for onboarding our entry-level talents into the SRE role.
Stars: ✭ 5,141 (+4294.02%)
Mutual labels:  sre
Dialectid e2e
End to End Dialect Identification using Convolutional Neural Network
Stars: ✭ 40 (-65.81%)
Mutual labels:  sre
Site Reliability Engineer Guide
Stars: ✭ 112 (-4.27%)
Mutual labels:  sre
Slo Generator
Easy setup a service level objective using prometheus
Stars: ✭ 91 (-22.22%)
Mutual labels:  sre
Wheel Of Misfortune
A role-playing game for incident management training
Stars: ✭ 57 (-51.28%)
Mutual labels:  sre

s3-streaming-upload s3-streaming-upload

s3-streaming-upload is node.js library that listens to your stream and upload its data to Amazon S3 and OCI Bucket Store.

It is heavily inspired by knox-mpu, but unlike it, it does not buffer data to disk and is build on top of official AWS SDK instead of knox.

Changes

  • Version 0.3.2 NodeJS 12+ supported.

  • Version 0.3.x Change from Coffee-script to Javascript. NodeJS 6 and 8 supported.

  • Version 0.2.x using ManagedUpload API. NodeJS 0.10 and 0.12 supported.

  • Version 0.1.x using MultiPartUpload API. NodeJS 0.8 and 0.10 supported.

Installation

Installation is done via NPM, by running npm install s3-streaming-upload

Features

  • Super easy to use
  • No need to know data size beforehand
  • Stream is buffered up to specified size (default 5MBs) and then uploaded to S3
  • Segments are not written to disk and memory is freed as soon as possible after upload
  • Uploading is asynchronous
  • You can react to upload status through events

Quick example

var Uploader = require('s3-streaming-upload').Uploader,
  upload = null,
  stream = require('fs').createReadStream('/etc/resolv.conf');

upload = new Uploader({
  // credentials to access AWS
  accessKey: process.env.AWS_S3_ACCESS_KEY,
  secretKey: process.env.AWS_S3_SECRET_KEY,
  bucket: process.env.AWS_S3_TEST_BUCKET,
  objectName: 'myUploadedFile',
  stream: stream,
  debug: true,
});

upload.send(function(err) {
  if (err) {
    console.error('Upload error' + err);
  }
});

Setting up ACL

Pass it in objectParams to the Uploader:

upload = new Uploader({
  // credentials to access AWS
  accessKey: process.env.AWS_API_KEY,
  secretKey: process.env.AWS_SECRET,
  bucket: process.env.AWS_S3_TRAFFIC_BACKUP_BUCKET,
  objectName: 'myUploadedFile',
  stream: stream,
  objectParams: {
    ACL: 'public-read',
  },
});

Example usage with Oracle Cloud (OCI) compatible S3 API

region = process.env.OCI_REGION;
tenancy = process.env.OCI_TENANCY;
// define custom service
service = new aws.S3({
  apiVersion: '2006-03-01',
  credentials: {
    accessKeyId: process.env.BUCKET_ACCESS_KEY,
    secretAccessKey: process.env.BUCKET_SECRET_KEY,
  },
  params: { Bucket: process.env.BUCKET_NAME },
  endpoint: `${tenancy}.compat.objectstorage.${region}.oraclecloud.com`,
  region: region,
  signatureVersion: 'v4',
  s3ForcePathStyle: true,
});

uploader = new Uploader({
  accessKey: process.env.BUCKET_ACCESS_KEY,
  secretKey: process.env.BUCKET_SECRET_KEY,
  bucket: process.env.BUCKET_NAME,
  objectName: filename,
  stream: source,
  service: service,
  objectParams: {
    ContentType: 'text/csv',
  },
  debug: true,
});
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].