diff --git a/cloud_governance/main/environment_variables.py b/cloud_governance/main/environment_variables.py index 57c9368b..73251eec 100644 --- a/cloud_governance/main/environment_variables.py +++ b/cloud_governance/main/environment_variables.py @@ -257,6 +257,7 @@ def get_aws_account_alias_name(self): account_alias = iam_client.list_account_aliases()['AccountAliases'] if account_alias: return account_alias[0].upper() + return os.environ.get('account', '').upper() except: return os.environ.get('account', '').upper() diff --git a/cloud_governance/policy/common_policies/send_aggregated_alerts.py b/cloud_governance/policy/common_policies/send_aggregated_alerts.py index e65732ce..8d5ebd66 100644 --- a/cloud_governance/policy/common_policies/send_aggregated_alerts.py +++ b/cloud_governance/policy/common_policies/send_aggregated_alerts.py @@ -30,7 +30,7 @@ def __get_es_data(self): :return: :rtype: """ - current_date = (datetime.utcnow().date() - timedelta(days=1)).__str__() + current_date = (datetime.utcnow().date()).__str__() policy_es_index = self.__environment_variables.get('es_index') account_name = (self.__environment_variables.get('account', '').upper() .replace('OPENSHIFT-', '')