From 8ff74f34bed5fdcab1b2c85b07a07285d6715c74 Mon Sep 17 00:00:00 2001 From: KuetTai Date: Wed, 18 Sep 2024 19:37:43 +0800 Subject: [PATCH] Added SingleAZ EFS checks --- .gitignore | 1 + services/efs/drivers/EfsDriver.py | 5 +++++ services/efs/efs.reporter.json | 15 +++++++++++++++ 3 files changed, 21 insertions(+) diff --git a/.gitignore b/.gitignore index b0fcf73..2223986 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ # Custom +.DS_Store test* crossAccounts.json output.zip diff --git a/services/efs/drivers/EfsDriver.py b/services/efs/drivers/EfsDriver.py index 507e8d7..77f24ec 100644 --- a/services/efs/drivers/EfsDriver.py +++ b/services/efs/drivers/EfsDriver.py @@ -42,3 +42,8 @@ def _checkBackupPolicy(self): if backup['BackupPolicy']['Status'] == 'DISABLED': self.results['AutomatedBackup'] = [-1, 'Disabled'] + + def _checkSingleAZ(self): + if 'AvailabilityZoneName' in self.efs: + self.results['IsSingleAZ'] = [-1, self.efs['AvailabilityZoneName']] + diff --git a/services/efs/efs.reporter.json b/services/efs/efs.reporter.json index b9f162b..f9f4691 100644 --- a/services/efs/efs.reporter.json +++ b/services/efs/efs.reporter.json @@ -37,5 +37,20 @@ "ref": [ "[EFS Backup]" ] + }, + "IsSingleAZ": { + "category": "R", + "^description": "Using EFS in SingleAZ is only suitable for development workload. It offers up to 47% cost saving compare to EFS Standard storage classes. It is not resilient to the loss of the Availability Zone.", + "downtime": 1, + "slowness": 0, + "additionalCost": 1, + "criticality": "M", + "needFullTest": 1, + "shortDesc": "Recreate new Regional EFS and migrate data over", + "ref": [ + "[Create EFS]", + "[Options to transfer data]", + "[Comparison between Regional vs SingleAZ]" + ] } } \ No newline at end of file