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
https://aws.amazon.com/solutions/implementations/instance-scheduler-on-aws/
Apache License 2.0
542 stars 264 forks source link

ignore a value of schedule tag key #560

Closed MO-BENCHEIKH closed 2 months ago

MO-BENCHEIKH commented 2 months ago

Hello,

i want use AlwaysON for instance that will be not scheduled ( for a governance propose ) but I have :

WARNING : EC2:i-080dc4506cbb6080d (test_ebs_encryption) is tagged with an unknown schedule: AlwaysON

as error message, which file that can I modify and rebuild solution the ignore instance tagged with Schedule = AlwaysON

( the lambda will skip and continue if a instance is tagged with AlwaysON without logging a error message ).

Thank you in advance for your reply.

Regards, MB

CrypticCabub commented 2 months ago

If you're looking to hard-code some functionality to ignore a schedule with a specific name without raising an error, I believe the place in the code you are looking for is https://github.com/aws-solutions/instance-scheduler-on-aws/blob/main/source/app/instance_scheduler/schedulers/instance_scheduler.py#L166-L176

Closing this as a duplicate of https://github.com/aws-solutions/instance-scheduler-on-aws/issues/322 which also requests support for a configurable no-op schedule