RDS cluster has IAM authentication enabled
RDS DB clusters on supported engines (MySQL/MariaDB/PostgreSQL/Aurora) have IAM database authentication enabled for database logins, indicating token-based access managed by IAM instead of static passwords.
Risk
Without IAM DB authentication, databases depend on long-lived passwords. Stolen or reused creds can enable unauthorized connections, data exfiltration, and tampering, harming confidentiality and integrity. Lacking short-lived tokens and centralized revocation expands blast radius and weakens access control.
Run this check with Prowler
Run in Prowler Cloudprowler aws --checks rds_cluster_iam_authentication_enabledRecommendation
Enable IAM database authentication on supported clusters and enforce least privilege. Grant only necessary rds-db:connect permissions to specific principals, prefer role-based access for workloads to obtain short-lived tokens, require TLS, and deprecate static DB passwords. Pair with auditing and segmentation for defense in depth.
Remediation
CLI
aws rds modify-db-cluster --db-cluster-identifier <DB_CLUSTER_ID> --enable-iam-database-authentication --apply-immediatelyTerraform
# Enable IAM authentication on an existing RDS/Aurora cluster
resource "aws_rds_cluster" "<example_resource_name>" {
cluster_identifier = "<example_resource_id>"
iam_database_authentication_enabled = true # Critical: enables IAM DB auth so the check passes
}NativeIaC
# CloudFormation: Enable IAM authentication on an existing RDS/Aurora DB Cluster
Resources:
<example_resource_name>:
Type: AWS::RDS::DBCluster
Properties:
EnableIAMDatabaseAuthentication: true # Critical: turns on IAM DB auth for the clusterOther
Check Code
from prowler.lib.check.models import Check, Check_Report_AWS
from prowler.providers.aws.services.rds.rds_client import rds_client
class rds_cluster_iam_authentication_enabled(Check):
def execute(self):
findings = []
for db_cluster in rds_client.db_clusters:
supported_engines = [
"postgres",
"aurora-postgresql",
"mysql",
"mariadb",
"aurora-mysql",
"aurora",
]
if (
engine in rds_client.db_clusters[db_cluster].engine
for engine in supported_engines
):
report = Check_Report_AWS(
metadata=self.metadata(),
resource=rds_client.db_clusters[db_cluster],
)
if rds_client.db_clusters[db_cluster].iam_auth:
report.status = "PASS"
report.status_extended = f"RDS Cluster {rds_client.db_clusters[db_cluster].id} has IAM authentication enabled."
else:
report.status = "FAIL"
report.status_extended = f"RDS Cluster {rds_client.db_clusters[db_cluster].id} does not have IAM authentication enabled."
findings.append(report)
return findingsReferences
- https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.Enabling.html
- https://www.trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/aws/RDS/iam-database-authentication.html#
- https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.Enabling.html
- https://docs.aws.amazon.com/securityhub/latest/userguide/rds-controls.html#rds-12