Instance Scheduler - Role Name Randomised
Hello,
First off, thank you for maintaining this solution, it is invaluable in our environment
We do have an issue that has caught us out a few times, if we remove and re-add the instance scheduler it re-creates roles with a random ID. This is an issue for our custom KMS keys where we have manually specified permissions for this role. Without these KMS permissions in place the instances will not start.
It would be great to have the option of manually enforcing the role name so we can ensure it remains the same when we re-launch the solution.
Many Thanks,
Thanks for your feedback. The role names are randomized by design to allow for multiple deployments of the solution in the same accounts. Having static role names would break this functionality and will not allow customers to support multiple deployments.
Easiest fix to avoid collision and keep static roles would be "MyRoleName-${AWS::StackName}-${AWS::Region}"
What you could do is add a parameter - MyRoleName - and if it is blank, use a random name. If not blank, use the above.