AWS re:Post을(를) 사용하면 다음에 동의하게 됩니다. AWS re:Post 이용 약관

Maintaining on-demand servers

0

I have 30 Linux on-demand servers. We only use these server during core business hours (8 to 6 pm). I created Lambda functions to start & stop and configured event bridge rule. We have automated OS patching scheduled on different day & time based on the environment (dev, test, uat, stage). I have many other Lambda functions to start/stop so that these servers can be available during patching. I have to maintain so many Lambda functions and Eventbridge rules. Is there any other effective way to do it?

3개 답변
1
수락된 답변

You could use the AWS Instance Scheduler to orchestrate the scheduling. You can configure schedules appropriate for each of your workloads in the DynamoDB table that controls the Instance Scheduler, and you can associate each instance with the appropriate schedule with a tag you configure on the instance. You can expose the tag in the EC2 instance view in the console to see easily which schedule is assigned to each instance.

You would need to configure the schedules in Instance Scheduler to include the patching window appropriate for each workload or patching code, depending on how you classify your workloads.

The Instance Scheduler is documented here: https://docs.aws.amazon.com/solutions/latest/instance-scheduler-on-aws/solution-overview.html. The configuration of schedules is explained on this page in the documentation: https://docs.aws.amazon.com/solutions/latest/instance-scheduler-on-aws/schedule-reference.html and tagging instances with schedules is explained here: https://docs.aws.amazon.com/solutions/latest/instance-scheduler-on-aws/operator-guide.html#tag-instances-for-scheduling

Note that if Windows servers are included in your patching process, it often completes rather quickly but sometimes takes substantially longer. If you trigger a power-off via EC2, whether it's with a Lambda function, through the console, or with the Instance Scheduler, EC2 will only wait for some minutes for the instance to finish powering off, and if it doesn't, EC2 will power it off anyway. As you may know, that may corrupt the whole Windows installation. The only safe way to power a Windows server off is to trigger the shutdown from inside Windows, so that the operating system is in control of the power-off. The AWS Instance Scheduler or your custom Lambda would only be responsible for powering the instances on. The Instance Scheduler also supports "start only" types of schedules.

전문가
답변함 4달 전
profile picture
전문가
검토됨 4달 전
1

Hello,

I think for this "Instance Scheduler on AWS" suitable for you.

[+] https://aws.amazon.com/solutions/implementations/instance-scheduler-on-aws/ [+] Instance Scheduler with CloudFormation: https://repost.aws/knowledge-center/stop-start-instance-scheduler

Enter image description here

profile picture
답변함 4달 전
  • I forgot to mention I cannot use SSM for patching. I have to use Jenkins pipelines.

0

You can power all these off and on with one step function and one or two lambda functions if your code is written in a modular way.

What do all your functions do?

profile picture
전문가
답변함 4달 전

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

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

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

관련 콘텐츠