Control: DynamoDB table should have encryption enabled
Description
Ensure that encryption is enabled for your Amazon DynamoDB tables. Because sensitive data can exist at rest in these tables, enable encryption at rest to help protect that data.
Usage
Run the control in your terminal:
powerpipe control run terraform_aws_compliance.control.dynamodb_table_encryption_enabledSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run terraform_aws_compliance.control.dynamodb_table_encryption_enabled --shareSQL
This control uses a named query:
select  address as resource,  case    when (attributes_std -> 'server_side_encryption') is not null then 'ok'    else 'alarm'  end status,  split_part(address, '.', 2) || case    when (attributes_std -> 'server_side_encryption') is not null then ' server-side encryption not set to DynamoDB owned KMS key'    else ' server-side encryption set to AWS owned CMK'  end || '.' as reason    , path || ':' || start_linefrom  terraform_resourcewhere  type = 'aws_dynamodb_table';