SQS queues should be encrypted with KMS CMK¶
To help protect sensitive data at rest, ensure encryption is enabled for your AWS SQS queues with KMS CMK.
How to fix¶
Attribute kms_master_key_id of aws_sqs_queue must be non-empty.
Implementation options¶
Choose the option that matches how you manage Terraform. All options satisfy this control.
Option 1: Compliance.tf module (recommended)¶
Use the compliance.tf registry module to get this control enforced by default. This control is mapped to the frameworks shown in the tabs above. To begin, see get started with compliance.tf.
module "sqs" {
source = "nistcsf.compliance.tf/terraform-aws-modules/sqs/aws"
version = ">=5.0.0"
fifo_queue = false
name = "abc123"
}
Option 2: Open source module (terraform-aws-modules)¶
If you use terraform-aws-modules/sqs/aws, configure the required module inputs to satisfy this control. You can later migrate to the compliance.tf module with minimal changes because it is compatible by design.
module "sqs" {
source = "terraform-aws-modules/sqs/aws"
version = ">=5.0.0"
fifo_queue = false
name = "abc123"
}
Option 3: Terraform AWS provider resources¶
If you manage resources directly, configure the relevant Terraform AWS provider resources to meet this control. See docs for the resources involved: aws_sqs_queue.
resource "aws_sqs_queue" "this" {
name = "pofix-example-queue"
kms_master_key_id = "arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012"
}
Which option should I choose?
- Compliance.tf module (recommended): controls enforced by default and mapped to frameworks.
- Open source module (
terraform-aws-modules): compatible by design with compliance.tf. Same variable names for an easy, low-change migration path when you are ready. - Terraform AWS provider resources: manage Terraform resources directly.
Tool mappings¶
Use these identifiers to cross-reference this control across tools, reports, and evidence.
Compliance.tf (CTF) Control:
sqs_queue_encrypted_with_kms_cmkCheckov Check:
CKV2_AWS_73Powerpipe Control:
aws_compliance.control.sqs_queue_encrypted_with_kms_cmk