Package | Version | URL |
---|---|---|
node-ssh | 12.0.2 | https://npmjs.com/package/node-ssh |
Package | Version | URL |
---|---|---|
AWS CLI | 2.4.2 | https://aws.amazon.com/cli/ |
Nodejs | 14.x | https://nodejs.org/en/ |
Yarn | 1.22.15 | https://classic.yarnpkg.com/en/ |
- 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
, andhost
- If
nvm
installed and.nvmrc
integration not set up, runnvm 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