Skip to content

Resource: awsS3BucketIntelligentTieringConfiguration

Provides an S3 Intelligent-Tiering configuration resource.

Example Usage

Add intelligent tiering configuration for entire S3 bucket

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsS3BucketExample = new aws.s3Bucket.S3Bucket(this, "example", {
  bucket: "example",
});
new aws.s3BucketIntelligentTieringConfiguration.S3BucketIntelligentTieringConfiguration(
  this,
  "example-entire-bucket",
  {
    bucket: awsS3BucketExample.id,
    name: "EntireBucket",
    tiering: [
      {
        accessTier: "DEEP_ARCHIVE_ACCESS",
        days: 180,
      },
      {
        accessTier: "ARCHIVE_ACCESS",
        days: 125,
      },
    ],
  }
);

Add intelligent tiering configuration with S3 object filter

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsS3BucketExample = new aws.s3Bucket.S3Bucket(this, "example", {
  bucket: "example",
});
new aws.s3BucketIntelligentTieringConfiguration.S3BucketIntelligentTieringConfiguration(
  this,
  "example-filtered",
  {
    bucket: awsS3BucketExample.id,
    filter: {
      prefix: "documents/",
      tags: {
        class: "blue",
        priority: "high",
      },
    },
    name: "ImportantBlueDocuments",
    status: "Disabled",
    tiering: [
      {
        accessTier: "ARCHIVE_ACCESS",
        days: 125,
      },
    ],
  }
);

Argument Reference

The following arguments are supported:

  • bucket - (Required) Name of the bucket this intelligent tiering configuration is associated with.
  • name - (Required) Unique name used to identify the S3 Intelligent-Tiering configuration for the bucket.
  • status - (Optional) Specifies the status of the configuration. Valid values: enabled, disabled.
  • filter - (Optional) Bucket filter. The configuration only includes objects that meet the filter's criteria (documented below).
  • tiering - (Required) S3 Intelligent-Tiering storage class tiers of the configuration (documented below).

The filter configuration supports the following:

  • prefix - (Optional) Object key name prefix that identifies the subset of objects to which the configuration applies.
  • tags - (Optional) All of these tags must exist in the object's tag set in order for the configuration to apply.

The tiering configuration supports the following:

  • accessTier - (Required) S3 Intelligent-Tiering access tier. Valid values: ARCHIVE_ACCESS, DEEP_ARCHIVE_ACCESS.
  • days - (Required) Number of consecutive days of no access after which an object will be eligible to be transitioned to the corresponding tier.

Attributes Reference

No additional attributes are exported.

Import

S3 bucket intelligent tiering configurations can be imported using bucket:name, e.g.

$ terraform import aws_s3_bucket_intelligent_tiering_configuration.my-bucket-entire-bucket my-bucket:EntireBucket