Skip to main content

AWS - Cloud Watcher Schedule for AWS lambda

Step 1:

Move to Cloud Watcher console of aws.
1) Click on Rules Menu.
2) Click on Schedule option once moved to rules menu
3) Give Crontab schedule expression, In my case, Instance should be stopped by 2AM everyday.
4) Click on 'Add Target' in the right side.
4a) Once dropdown appears, select Lambda Function. 
4b) Function dropdown, select your lambda function, i.e. ecStopStart
5) Finally click on, configure details.



6) Cron Expression hours and day will work upon the timezone. It is with GMT. I have updated it to +5hrs 30mins UTC.


7) In the configuration details page, provide name, description and enable the the configuration.


8) Thats it.


Source : aws-console ec2 instance stop & start with cloud watch

Comments

Popular posts from this blog

AWS - EC2 Instance Start / Stop using AWS Lambda Python

Steps to Setup Lambda to Start / Stop EC2 instances: 1) Create a Lambda Function with 'Author from scratch' and with Function name 'ecStartInstance' and Runtime 'Python 3.8' 2) Choose new role with basic Lambda permission 3) Create policy using IAM role 4) Click on JSON Editor option and update EC2 instance policy json and click on 'Review Policy' JSON: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents" ], "Resource": "arn:aws:logs:*:*:*" }, { "Effect": "Allow", "Action": [ "ec2:Start*", "ec2:Stop*" ], "Resource": "*" } ] } 5) Give name ...

NASA's EMIT - Mineral dust investigator

Installing Postgres using Docker Container - Ubuntu 18.04

 Step1: Install Docker using Ubuntu Terminal Command: sudo apt install docker.io Step 2: Check docker is available command: docker Step 3: Check Docker Service is up and running. command: sudo service docker status Step 4: Pull latest postgres into docker command: docker pull postgres Step 5: check docker image is available cmd: docker images Step 6: Run the docker postgres image and validate container started running. cmd: sudo docker run --name psql-ultra -e POSTGRES_PASSWORD=master -d postgres sudo docker ps Note: postgres port 5432 and ubuntu 5432 tcp port has to get update. So normal -p command with docker won't work. Hope this helps!