handle invalid structure in LambdaEnvironmentEncryptionSettings
@@ -17,7 +17,9 @@ class LambdaEnvironmentEncryptionSettings(BaseResourceCheck):
if properties is not None:
env = properties.get('Environment')
if env is not None:
- if env.get('Variables') and not properties.get('KmsKeyArn'):
+ if not isinstance(env, dict):
+ return CheckResult.UNKNOWN
+ elif env.get('Variables') and not properties.get('KmsKeyArn'):
return CheckResult.FAILED
return CheckResult.PASSED
