Hibernate EC2 instance with AWS Scheduler?

0

Is it possible to schedule hibernation of an instance just like Start/Stop? Am I reading correctly that hibernate is a keyword in DynamoDB https://docs.aws.amazon.com/solutions/latest/instance-scheduler-on-aws/components.html If so, how do I create a schedule? BTW, my EC2 instance works fine and I can manually hibernate it at will.

Thank you MN

질문됨 일 년 전611회 조회
1개 답변
0

You can use EC2 Instance Scheduler to "hibernate" your EC2 instances. To achieve this you will have to add boolean attribute named "hibernate" in the schedule stored in Dynamo DB table "ec2-instance-scheduler-ConfigTable".

Add hibernation attribute to the schedule in Dynamo DB

Note: For "hibernating" to work your EC2 instance must fulfil the prerequisite mentioned in the below document.

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hibernating-prerequisites.html

AWS
Akshay
답변함 일 년 전
  • Thank you very much. This looks very much consistent with the documentation that I cited. I am going to try this and if works, I will accept your answer. Many thanks!

    UPDATE: Somehow, this command has no effect on my EC2 even though I added a tag for schedule that contains hibernate. There is a logic of true/false and office_hours. I tried various combinations of true/false and hours. EC2 does not respect this schedule. Have you tried "hibernate" yourself?

  • I have tested with Amazon Linux 2 (30 GB encrypted volume) and Windows server 2022 Base(50 GB encrypted volume) and hibernation behaviour enabled. EC2 scheduler is able to successfully hibernate the instances. When you start the instance again after hibernating you can check system logs to verify the hibernation, is will start something like below- [ 2.456939] PM: hibernation: resume from hibernation [ 2.467870] Freezing user space processes ... (elapsed 0.000 seconds) done.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠