Comments on AWS Lambda Function to Start and Stop an EC2 Instance

Lambda falls under “Compute” service in AWS (Amazon Web Services). Using Lambda we can code without provisioning or managing servers. In this article, we will see how to create a simple Lambda function that can start/stop an EC2 instance.

5 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: farooqkadri

Very useful tutorial

By: Amol Ganje

Thanks a lot .really apriciated .i tried many times but it wasnt successful this page made it easy to setup basic stat stop ec2 lambda function .do we have another page to start and stop ec2 automatiocally at particuolar time and date 

By: Rahul Shivalkar

You can add an "EventBridge (CLoudwatch Events)" trigger in the Lambda Function.  "Create a new rule" in the trigger of Rule Type "Schedule expression", add a "Schedule expression" of your choice.

By: Alejandro

Thanks bro, very well explained

By: ragu

how can i used lambda code stop 1000 instances in all region by automaticaly get their instances ID