Automatically Start Stop EC2 Instances with AWS Lambda and Amazon EventBridge
ฝัง
- เผยแพร่เมื่อ 5 ก.ย. 2024
- This video demonstrates how AWS Lambda and Amazon EventBridge can help you build event-driven applications and perform daily operational tasks like stop and start EC2 Instances at designated schedules.
This how-to guide comes with the necessary IAM policies and Lambda function code written in python to help you start and stop your EC2 Instances.
As part of our AWS Certified Solutions Architect SAA-C03 course, this video provides one of many hands-on demonstrations to help you build real-world solutions in the cloud and will most definitely help you ace the AWS Certified Solutions Architect Exam.
Check out the IAM Policy and Lambda Function code in our GitHub repository - github.com/iaa...
To take the entire course, visit us at iaasacademy.com
Take my AWS Technical Essentials Course using this discount link: www.udemy.com/... - วิทยาศาสตร์และเทคโนโลยี
Hello,
I had some problems with this. The Lambda function wored fine but the scheduler never ran it.
If you have this problem, you must add in the policy something like:
{
"Sid": "lambdapermissions",
"Effect": "Allow",
"Action": "lambda:InvokeFunction",
"Resource": "*"
}
It solved my problem, now the EventBidge works fine.
Awesome. Very thorough video!
Thank you, glad to hear that you found it useful.
thanks for sharing!
My pleasure!
can you provide documentation of this video?
what about i want to stop in sequence? let say delay of 15mins per instance? same with start
Hi Ryan, you can use rate expressions here instead of specify scheduled times - docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-rule-schedule.html#eb-rate-expressions