Giter Site home page Giter Site logo

jacobjohansen / lambda-s3-sftp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from renanivo/lambda-s3-sftp

0.0 0.0 0.0 9 KB

DEPRECATED! AWS lambda function to send an S3 file, whenever it is uploaded, to a remote server using SFTP

License: MIT License

Makefile 7.72% Python 92.28%

lambda-s3-sftp's Introduction

λ S3 to SFTP

Send an S3 file, whenever it is uploaded, to a remote server using SFTP

Warning: This repository is not under development or maintenance anymore, I strongly recommend using the yunojuno's fork instead

Deployment

  1. If you are using a private key to connect to SFTP, edit main.py and put its value inside the PRIVATE_KEY var
  2. make package
  3. Upload package.zip to AWS Lambda (on console or command line)

Configuration in AWS Lambda

  • Select Python 2.7 as the runtime environment.
  • In AWS Lambda, you can define a trigger. Select S3 and then PUT. you can limit the triggers to a particular folder there.
  • Set the handler name to "main.lambda_handler"
  • Make sure you give Lambda permission to read from S3

Supported Events

  • S3 PUT

Function Environment Vars

Name Description Required
SSH_HOST SSH server name or ip address Yes
SSH_PORT SSH server port Not (default: 22)
SSH_DIR Directory where the uploaded files should be placed in the SSH server No (default: SFTP home folder)
SSH_USERNAME SSH username for the connection Yes
SSH_PASSWORD SSH server password Not (default: None)

Caveats

This function does not replicates the S3 directory structure, it just copies every file uploaded to S3 to the SSH_DIR in the SSH_HOST.

lambda-s3-sftp's People

Contributors

markstos avatar renanivo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.