Tokyo
Tokyo

Reputation: 211

AWS Lambda SSH to Non-AWS Instance

I need to ssh to a non-AWS instance to push some files via Lambda. I see ssh from Lambda is possible but I can't see an example of ssh to a non-AWS instance. Is it possible?

Upvotes: 0

Views: 662

Answers (2)

John Rotenstein
John Rotenstein

Reputation: 270059

It is rather unusual to use SSH from an AWS Lambda function. SSH is normally used for humans to login to a Linux computer.

If your goal is to get files onto a computer that is somewhere on the Internet, a better architecture might be to put the files in Amazon S3 and then have the remote computer 'pull' the data from S3. This offers better security and is a more 'loosely coupled' architecture.

If you do need to copy files from via an AWS Lambda function, consider using scp instead. There is a Python library available: scp · PyPI

Upvotes: 1

Chris Williams
Chris Williams

Reputation: 35238

You would want to connect to the non-aws instance via SFTP. You would want a library based on your runtime that supports SFTP.

Is their an intrinsic need to have the files be stored on a remote instance?

Upvotes: 0

Related Questions