This template creates an AWS Systems Manager maintenance window target that targets managed instances with a specific tag.

CloudFormation Template