Skip to content

RSA certificates managed by ACM should use a key length of at least 2,048 bits

This control checks whether RSA certificates managed by AWS Certificate Manager use a key length of at least 2,048 bits. The control fails if the key length is smaller than 2,048 bits.

How to fix

Attribute key_algorithm of aws_acm_certificate must be one of: "RSA_2048", "RSA_3072", "RSA_4096", "EC_prime256v1", "EC_secp384r1", "EC_secp521r1".

Implementation options

Choose the option that matches how you manage Terraform. All options satisfy this control.

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 "acm" {
  source  = "acscism2023.compliance.tf/terraform-aws-modules/acm/aws"
  version = ">=6.0.0,<7.0.0"

  domain_name               = "example.com"
  subject_alternative_names = ["*.example.com"]
  wait_for_validation       = false
  zone_id                   = "Z1234567890ABC"

  key_algorithm = "RSA_2048"
}
module "acm" {
  source  = "nistcsf.compliance.tf/terraform-aws-modules/acm/aws"
  version = ">=6.0.0,<7.0.0"

  domain_name               = "example.com"
  subject_alternative_names = ["*.example.com"]
  wait_for_validation       = false
  zone_id                   = "Z1234567890ABC"

  key_algorithm = "RSA_2048"
}

Option 2: Open source module (terraform-aws-modules)

If you use terraform-aws-modules/acm/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 "acm" {
  source  = "terraform-aws-modules/acm/aws"
  version = ">=6.0.0,<7.0.0"

  domain_name               = "example.com"
  subject_alternative_names = ["*.example.com"]
  wait_for_validation       = false
  zone_id                   = "Z1234567890ABC"

  key_algorithm = "RSA_2048"
}

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_acm_certificate.

resource "aws_acm_certificate" "this" {
  domain_name       = "example.com"
  validation_method = "DNS"

  key_algorithm = "RSA_2048"
}
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: acm_certificate_rsa_key_length_2048_bits_or_greater

  • AWS Config Managed Rule: ACM_CERTIFICATE_RSA_CHECK

  • Powerpipe Control: aws_compliance.control.acm_certificate_rsa_key_length_2048_bits_or_greater