Control: EMR clusters local disk encryption should be enabled
Description
This control checks whether EMR cluster have local disk encryption enabled. This control fails if an EMR cluster local disk isn't encrypted.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.emr_cluster_local_disk_encryption_enabled
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.emr_cluster_local_disk_encryption_enabled --share
SQL
This control uses a named query:
select cluster_arn as resource, case when s.name is null then 'alarm' when s.name is not null and (encryption_configuration -> 'EnableAtRestEncryption')::bool and (encryption_configuration -> 'AtRestEncryptionConfiguration' -> 'LocalDiskEncryptionConfiguration') is not null then 'ok' else 'alarm' end as status, case when s.name is null then c.title || ' security configuration disabled.' when s.name is not null and (encryption_configuration -> 'EnableAtRestEncryption')::bool and (encryption_configuration -> 'AtRestEncryptionConfiguration' -> 'LocalDiskEncryptionConfiguration') is not null then c.title || ' local disk encryption enabled.' else c.title || ' local disk encryption disabled.' end as reason , c.region, c.account_idfrom aws_emr_cluster as c left join aws_emr_security_configuration as s on c.security_configuration = s.name and s.region = s.region and s.account_id = c.account_id;