diff --git a/cloud_governance/policy/helpers/aws/aws_policy_operations.py b/cloud_governance/policy/helpers/aws/aws_policy_operations.py index 38ae3b66..4c67f81c 100644 --- a/cloud_governance/policy/helpers/aws/aws_policy_operations.py +++ b/cloud_governance/policy/helpers/aws/aws_policy_operations.py @@ -132,10 +132,8 @@ def update_resource_day_count_tag(self, resource_id: str, cleanup_days: int, tag elif self._policy == 'empty_roles': self._iam_client.tag_role(RoleName=resource_id, Tags=tags) elif self._policy in ('ip_unattached', 'unused_nat_gateway', 'zombie_snapshots', 'unattached_volume', - 'instance_run'): + 'instance_run', 'instance_idle'): self._ec2_client.create_tags(Resources=[resource_id], Tags=tags) - elif self._policy == 'instance_idle': - self._ec2_client.stop_instances(InstanceIds=[resource_id]) except Exception as err: logger.info(f'Exception raised: {err}: {resource_id}')