Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sftp-to-s3

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sftp-to-s3

library to upload files from sftp server to aws s3

  • 1.0.10
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

sftp-to-s3

example
const SftpToS3 = require('sftp-to-s3');
const config = {
  sftp: {
    host: process.env.hostname,
    username: process.env.user, 
    password: process.env.password,
    port: 6522,
    privateKey: fs.readFileSync(process.env['HOME'] + '/.ssh/first_data_key')
  },
  aws: {
    bucket: "bucket_name", accessKeyId: 'AKID', secretAccessKey: 'SECRET', region: 'us-west-2'
  },
  fileDownloadDir: "/",
  completedDir: '/completed-uploads/'
};

SftpToS3.batch(config)
  .then((success) => {
    console.log(success)
  })
  .catch((err) => {
    console.error(err)
  })
Gotchas

make sure your completedDir and fileDownloadDir are absolute paths. Do not use a path such as ./completedDir, becasue then a file will not be found...derp

if you have your aws set up properly with the .aws folder in home directory, you will not need to provide secretAccessKey or region, only bucket will need to be in the config.

for complete aws s3 config options go here

for complete sftp config options go here

Keywords

FAQs

Package last updated on 19 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc