Skip to content

fix: force resource name change on scheduled functions since resource type was changed#174

Open
filmaj wants to merge 1 commit intomainfrom
sched-rule-type-fix
Open

fix: force resource name change on scheduled functions since resource type was changed#174
filmaj wants to merge 1 commit intomainfrom
sched-rule-type-fix

Conversation

@filmaj
Copy link
Member

@filmaj filmaj commented Feb 16, 2026

This PR fixes architect/architect#1518.

In #173, we expanded the feature set of scheduled functions, allowing for configuration of timezone. However, this change required a CloudFormation resource type change (from AWS::Events::Rule to AWS::Scheduler::Schedule). However, we did not change the resource name. Changing resource type for existing resources is not permitted in CloudFormation. For Stacks that were already deployed prior to the change introduced in #173, this led to the error seen in the issue above:

Update of resource type is not permitted. The new template modifies resource type of the following resources: [FooScheduledEvent, BarScheduledEvent, ...]

This PR addresses this problem by changing the resource name for the scheduled event. For existing Stacks, this would force a delete + create operation on deploy. Since the schedule rule and lambda are both stateless, this should be an idempotent operation.

@filmaj filmaj self-assigned this Feb 16, 2026
Copy link
Contributor

@macdonst macdonst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea to force the name change. Thanks for taking this one on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

@scheduled deploys fail after @architect/package@11.0.2 due to CloudFormation resource type change

2 participants

Comments