diff --git a/moto/cloudformation/models.py b/moto/cloudformation/models.py index e631a4d6a..1d5b300c6 100644 --- a/moto/cloudformation/models.py +++ b/moto/cloudformation/models.py @@ -665,7 +665,9 @@ class CloudFormationBackend(BaseBackend): else: for cs in self.change_sets: if self.change_sets[cs].change_set_name == change_set_name: - del self.change_sets[cs] + to_delete = cs + break + del self.change_sets[to_delete] def describe_change_set(self, change_set_name, stack_name=None): change_set = None