Due to the increase in dart scheduled triggers, we are hitting our cloudwatch rule limits fast. We have long known that the creation of rules and targets was not implemented efficiently in Dart. It's time to improve this logic.
A/C:
Case 1: Create New Trigger
If a cloudwatch rule matching the cron pattern does not exist, create a new one. Add the target to this newly created rule.
If a cloudwatch rule matching the cron pattern does not exist, create a new one. Remove the target from the old rule. Delete if no remaining targets. Add the target to the new rule.
If a cloudwatch rule matching the cron pattern does exist, simple remove the target from the old rule and add it to the updated rule.
If state is disabled, remove target from rule. If it's enabled, add target back to rule (Needs to create new rule if required).
Case 3: Delete Trigger
Remove the target from the cloudwatch rule. If there are no remaining targets in the rule, delete the rule as well.
Due to the increase in dart scheduled triggers, we are hitting our cloudwatch rule limits fast. We have long known that the creation of rules and targets was not implemented efficiently in Dart. It's time to improve this logic.
A/C:
Case 1: Create New Trigger
Case 2: Update Trigger
Case 3: Delete Trigger