Sets up intelligent tiering with filters for specific objects in an S3 bucket, allowing for more granular control over storage tiering based on object tags and prefixes.

Terraform Template

resource "aws_s3_bucket" "example" {
  bucket = "example"
}

resource "aws_s3_bucket_intelligent_tiering_configuration" "example-filtered" {
  bucket = aws_s3_bucket.example.id

  filter {
    prefix = "documents/"

    tags = {
      class = "blue"
      priority = "high"
    }
  }
  name = "ImportantBlueDocuments"
  status = "Disabled"

  tiering {
    access_tier = "ARCHIVE_ACCESS"
    days = 125
  }
}