Repository files navigation SNS to SSH Lambda function
!!! SSH won't complete a connection within the short time a Lambda function should run !!!
Lambda function name, profile able to execute it and region
SSH key, username and hostname of server to SSH into
MacOS or linux - Windows will at least need different procedures
Create a Lambda function connected to the desired SNS topic
Add environment variables for pemfilename, user, and host
If nvm installed and .nvmrc integration not set up, run nvm use to get Node version
Add the pem key to the lambda folder with the filename from pemfilename
Run chmod 444 on the pem key so it can be zipped
Run yarn in the lambda folder to install simple-ssh dependency
Copy the .env.example file to .env and set the variables
After adding the AWS credentials to the .env file, run test.sh to test if the connection is working
Run the deploy.sh script
???
Profit
About
A small example project of a Lambda function code and deployment script, which when triggered will SSH to a nominated server
Topics
Resources
Stars
Watchers
Forks
You can’t perform that action at this time.