S3 bucket replication (cross-region or same-region) is not enabled Affecting S3 service in AWS


Severity

0.0
medium
0
10
Severity Framework
Snyk CCSS
Rule category
Availability/ Redundancy

Is your environment affected by this misconfiguration?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
Frameworks
CIS-ControlsCSA-CCMISO-27001NIST-800-53PCI-DSSSOC-2
  • Snyk IDSNYK-CC-00177
  • creditSnyk Research Team

Description

Cross-Region S3 replication can help with meeting compliance requirements, minimizing latency, and increasing operational efficiency. Same-Region S3 replication can help with aggregating logs and compliance with data sovereignty laws.

How to fix?

Configure a replication_configuration block that specifies an IAM role for replicating objects and rules managing the replication.

Example Configuration

resource "aws_s3_bucket" "bucket" {
  provider = "aws.central"
  bucket   = "valid-replication-host"
  acl      = "private"

  versioning {
    enabled = true
  }

  replication_configuration {
    role = "${aws_iam_role.replication.arn}"

    rules {
      id     = "ruleid"
      prefix = "ruleprefix"
      status = "Enabled"

      destination {
        bucket        = "${aws_s3_bucket.destination.arn}"
        storage_class = "STANDARD"
      }
    }
  }
  
  # other required fields here
}