aws-solutions / instance-scheduler-on-aws

A cross-account and cross-region solution that allows customers to automatically start and stop EC2 and RDS Instances

Home Page:https://aws.amazon.com/solutions/implementations/instance-scheduler-on-aws/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Instances dont start or stop

mike23101994 opened this issue · comments

HI Team,

We are currently using AWS Instance Scheduler for scheduling our instances.We have used CloudFormation template to create all the infrastructure.
The issue which we are facing is:-
We have a partition key name "schedule" in the DynamoDB and the sort key for that partition key is "GlobalOfficeHoursSchedule", so all the ec2 and rds instances have the tag Schedule= GlobalOfficeHoursSchedule..it is stopping the instances..
But now when we have added another partition key "schedule" with the sort key as "DevOpsOfficeHoursSchedule", it is not starting or stopping the instances with the tag Schedule= DevOpsOfficeHoursSchedule .
I have raised an AWS Support ticket..they have suggested to delete the rds and ec2 instance information from the state table. On doing that it worked to stop the instances..but it didnt start the instances later.

Hi Mike, could you share the configuration of DecOpsOfficeHoursSchedule (both the schedule and periods)?

It's possible that a misconfiguration of the schedule could be causing it to not be loaded by the scheduler. If I remember correctly, there should be an error in the orchestrator logs pertaining to the invalid configuration.

Clearing the state table will have the effect of resetting Instance Scheduler's knowledge of historical instance state data which primarily used for ensuring instance_scheduler does not override manual customer action when it is not supposed to (such as for the retain running flag and schedules with enforce = false).

Closing because stale, please re-open if you are able to provide any more detail