AWS instance scheduler not working


I have installed aws instance scheduler via cloudformation stack. I have also configured a schedule and a period as well as added a tag to the ec2 instance. i have verified all the settings are correct and i see the job being run on the schedule but it isnt stopping/starting the instance.

已提問 1 年前檢視次數 958 次
1 個回答

Hello there, please check if your EBS volume is encrypted. If it is, then the issue may be that the IAM role used doesn't have the correct KMS permissions. If you are able to confirm that this is the issue then you'll need to grant the Instance Scheduler permission to use the customer master key (CMK) to start and stop instances. Add the kms:CreateGrant permission to the Instance Scheduler role (<stackname>-SchedulerRole-<id>)[1].

If the above is not the issue, you will then need to check the Cloudwatch Log group for the instance sheduler lambda function, the log group created will have the below files[2]:

  • InstanceScheduler-yyyymmdd: Logs general scheduler messages
  • CloudWatchEventHandler-yyyymmdd: Logs general Amazon CloudWatch event rule information
  • SchedulerSetupHandler: Logs the output of configuration actions
  • Scheduler-<service>-<account>-<region>-yyyymmdd: Logs the service, account, and region of each scheduled instance
  • AdminCliRequestHandler-yyyymmdd: Logs requests from the admin CLI

You will need to look at each, but I recommend starting with InstanceScheduler-yyyymmdd, as any issues with starting/stopping the error would be seen here.

已回答 1 年前
  • Thank you! Ran into this issue with trying to hibernate instances automatically, which requires encrypted EBS volumes.

您尚未登入。 登入 去張貼答案。