diff --git a/cloud/amazon/s3_lifecycle.py b/cloud/amazon/s3_lifecycle.py index 891beac01f1..bdfdc49da91 100644 --- a/cloud/amazon/s3_lifecycle.py +++ b/cloud/amazon/s3_lifecycle.py @@ -219,6 +219,8 @@ def create_lifecycle_rule(connection, module): lifecycle_obj.append(rule) changed = True appended = True + else: + lifecycle_obj.append(existing_rule) # If nothing appended then append now as the rule must not exist if not appended: lifecycle_obj.append(rule)