You can configure and use Automation document like "AWS-StartEC2Instance" and "AWS-StopEC2Instance" in Maintenance window with Tags.
I would recommend you to configure parameter for Instance ID with below value, select registered targets with Tags and do not need to specify Instance ID other than below value:
I hope this solution will fix your issue.
Thank you for your question. If I understand your goal correctly, you would like to run maintenance window at specific point in time on specific instances. Currently, you are using "Tags" to encode when an instance can be patched. If this is the case, I think you can try to use the flags: (1) --schedule, (2) --duration and (3) --schedule-timezone to encode the time when maintenance window runs when using the "ssm create-maintenance-window" command. Hope this helps!
Automatically stop and start an Amazon RDS DB instance in a CDK appAccepted Answerasked 3 months ago
Aurora Postgres cluster failed to upgrade from 13.4 to 13.4.2 at maintenance windowAccepted Answerasked 8 months ago
How to have client applications start/stop EC2 instancesasked 4 months ago
Aurora cluster maintenance window and minor version upgradesasked a year ago
State Manager vs Maintenance WindowAccepted Answerasked 2 years ago
PowerShell script to Start and Stop of SAP Services and Ec2 instance running on windows platform using SSMasked a year ago
Logging EC2 power state before maintenance window, then return to that stateasked a month ago
How can I update the maintenance window and apply the new features or new ONTAP version for FSx for ONTAP earlier than existing weekly maintenance window?Accepted Answerasked a year ago
Stop / Start instances assigned to a Maintenance Windows IDasked 25 days ago
Starting targeted instances during a maintenance window?asked 2 months ago