S3 bucket MFA delete should be enabled¶
Once MFA Delete is enabled on your sensitive and classified S3 bucket it requires the user to have two forms of authentication.
How to fix¶
Attribute versioning_configuration[0].mfa_delete of aws_s3_bucket_versioning must be "Enabled".
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 "s3_bucket" {
source = "acscessentialeight.compliance.tf/terraform-aws-modules/s3-bucket/aws"
version = ">=5.0.0"
bucket = "abc123"
}
module "s3_bucket" {
source = "cisv120.compliance.tf/terraform-aws-modules/s3-bucket/aws"
version = ">=5.0.0"
bucket = "abc123"
}
module "s3_bucket" {
source = "cisv500.compliance.tf/terraform-aws-modules/s3-bucket/aws"
version = ">=5.0.0"
bucket = "abc123"
}
module "s3_bucket" {
source = "cisv600.compliance.tf/terraform-aws-modules/s3-bucket/aws"
version = ">=5.0.0"
bucket = "abc123"
}
module "s3_bucket" {
source = "nistcsfv11.compliance.tf/terraform-aws-modules/s3-bucket/aws"
version = ">=5.0.0"
bucket = "abc123"
}
module "s3_bucket" {
source = "pcidss.compliance.tf/terraform-aws-modules/s3-bucket/aws"
version = ">=5.0.0"
bucket = "abc123"
}
Option 2: Open source module (terraform-aws-modules)¶
If you use terraform-aws-modules/s3-bucket/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 "s3_bucket" {
source = "terraform-aws-modules/s3-bucket/aws"
version = ">=5.0.0"
bucket = "abc123"
versioning = {
mfa_delete = "Enabled"
}
}
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_s3_bucket_versioning.
resource "aws_s3_bucket" "this" {
bucket = "example-abc123"
force_destroy = true
}
resource "aws_s3_bucket_versioning" "this" {
bucket = "example-bucket-abc123"
versioning_configuration {
mfa_delete = "Enabled"
status = "Enabled"
}
}
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:
s3_bucket_mfa_delete_enabledAWS Config Managed Rule:
S3_BUCKET_MFA_DELETE_ENABLEDPowerpipe Controls:
aws_compliance.control.cis_v500_2_1_2,aws_compliance.control.cis_v600_3_1_2,aws_compliance.control.s3_bucket_mfa_delete_enabled