check-ec2-event
v0.1.0
Published
This tool checks and notifies scheduled maintenance events of your AWS EC2 instance, and notify to your slack channel.
Downloads
4
Readme
check-ec2-event
Overview
Tools of checking AWS EC2 maintenance event
Description
This tool checks scheduled maintenance events of your AWS EC2 instance, and notify to your slack channel.
Requirement
- Node.js 8.x
Install
$ npm i check-ec2-event
$ cd node_modules/check-ec2-event
or
$ git clone [email protected]:kitakitabauer/check-ec2-event.git
$ cd check-ec2-event
$ npm i
Run on local
- Add your environment variables to .env file.
REGION = "your AWS region"
FUNCTION_NAME = "your AWS Lambda function name"
WEBHOOK_URI = "your incoming webhook url of slack"
SLACK_CHANNEL = "slack channel that you want to notify"
SLACK_ICON_EMOJI = "icon emoji of notification bot"
SLACK_USERNAME = "user name of notification bot"
- Execute npm run.
$ npm run local
Run on AWS Lambda
- Prepare an empty Lambda function in advance at your AWS console.
- It compiles and deployes scripts including node_modules in zip format, but aws-cli is required.
$ ./zipDeploy.sh [Lambda function name]
- Run it from your AWS account or aws-cli.