Skip to content

IAM authentication should be configured for RDS clusters

Checks if an AWS RDS Cluster has AWS Identity and Access Management (IAM) authentication enabled. The rule is non-compliant if an RDS Cluster does not have IAM authentication enabled.

How to fix

Attribute iam_database_authentication_enabled of aws_rds_cluster must be true.

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 "rds_aurora" {
  source  = "acscessentialeight.compliance.tf/terraform-aws-modules/rds-aurora/aws"
  version = ">=10.0.0,<11.0.0"

  engine         = "aurora-postgresql"
  engine_version = "16.1"
  instances = {
    one = {
      instance_class = "db.r6g.large"
    }
  }
  master_username = "root"
  name            = "abc123"
  subnets         = []
  vpc_id          = ""
}
module "rds_aurora" {
  source  = "nist800171.compliance.tf/terraform-aws-modules/rds-aurora/aws"
  version = ">=10.0.0,<11.0.0"

  engine         = "aurora-postgresql"
  engine_version = "16.1"
  instances = {
    one = {
      instance_class = "db.r6g.large"
    }
  }
  master_username = "root"
  name            = "abc123"
  subnets         = []
  vpc_id          = ""
}
module "rds_aurora" {
  source  = "nistcsfv11.compliance.tf/terraform-aws-modules/rds-aurora/aws"
  version = ">=10.0.0,<11.0.0"

  engine         = "aurora-postgresql"
  engine_version = "16.1"
  instances = {
    one = {
      instance_class = "db.r6g.large"
    }
  }
  master_username = "root"
  name            = "abc123"
  subnets         = []
  vpc_id          = ""
}
module "rds_aurora" {
  source  = "pcidss.compliance.tf/terraform-aws-modules/rds-aurora/aws"
  version = ">=10.0.0,<11.0.0"

  engine         = "aurora-postgresql"
  engine_version = "16.1"
  instances = {
    one = {
      instance_class = "db.r6g.large"
    }
  }
  master_username = "root"
  name            = "abc123"
  subnets         = []
  vpc_id          = ""
}

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

If you use terraform-aws-modules/rds-aurora/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 "rds_aurora" {
  source  = "terraform-aws-modules/rds-aurora/aws"
  version = ">=10.0.0,<11.0.0"

  engine         = "aurora-postgresql"
  engine_version = "16.1"
  instances = {
    one = {
      instance_class = "db.r6g.large"
    }
  }
  master_username = "root"
  name            = "abc123"
  subnets         = []
  vpc_id          = ""

  iam_database_authentication_enabled = true
}

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

resource "aws_rds_cluster" "this" {
  backtrack_window                = 72
  cluster_identifier              = "pofix-example-cluster"
  enabled_cloudwatch_logs_exports = ["audit", "postgresql"]
  engine                          = "aurora-mysql"
  master_password                 = "ChangeMe123!"
  master_username                 = "dbadmin"

  iam_database_authentication_enabled = true
}
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: rds_db_cluster_iam_authentication_enabled

  • AWS Config Managed Rule: RDS_CLUSTER_IAM_AUTHENTICATION_ENABLED

  • Checkov Check: CKV_AWS_162

  • Powerpipe Control: aws_compliance.control.rds_db_cluster_iam_authentication_enabled