Git Product home page Git Product logo

faassh's Introduction

faassh

simple go SSH server designed for running in cloud functions

image

This is just for fun. It's a simple SSH server and tunnel-er that allows you to SSH into a running lambda function—until it times out.

Developed for my dotScale 2017 talk, "Searching for the Server in Serverless". Slides here.

building

This project uses the Serverless Application Model for packaging and deploying.

   $ sam build
   $ sam package --s3-bucket <yourbucket> > packaged.yaml
   $ sam deploy --template-file packaged.yaml --stack-name <yourstack> --capabilities CAPABILITY_IAM

usage

   faassh -i ./path_to_private_rsa_host_key -p port_number

example

See the example node.js lambda function in the lambda/ directory.

  • Generate RSA keys for the Lambda function and bundle inside the lambda directory (ssh-keygen -t rsa -f ./id_rsa)
  • Set the envionment variables to point to your SSH jump host with the correct username.

If you'd like to test it on your local laptop that's behind (hopefully) a NAT/firewall, I like the TCP forwarding available on ngrok. You can create a tunnel to your local SSH server for the other end of the tunnel endpoint, you just run: ngrok tcp 22.

other interesting/related projects

  • lambdash - another approach for running commands in Lambda
  • awslambdaproxy - An AWS Lambda powered HTTP/SOCKS web proxy

todo

  • better authentication support
  • other cloud providers
  • connection cleanup
  • terraform/cloudformation helper
  • multiple connections
  • tests and docs :)

faassh's People

Contributors

smithclay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

faassh's Issues

BUG: Unable to upload artifact ../../layer referenced by ContentUri

Running sam package or sam deploy threw the same error:

Error: Unable to upload artifact ../../layer referenced by ContentUri parameter of FaasshLayer resource.  
Parameter ContentUri of resource FaasshLayer refers to a file or folder that does not exist /Users/k8s/dev/faassh/layer 

More details :

  • OS: macOS 10.13.6
  • SAM version: SAM CLI, version 0.47.0

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.