aws-cdk-lib.aws_s3.StorageClass

class StorageClass

LanguageType name
.NETAmazon.CDK.AWS.S3.StorageClass
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awss3#StorageClass
Javasoftware.amazon.awscdk.services.s3.StorageClass
Pythonaws_cdk.aws_s3.StorageClass
TypeScript (source)aws-cdk-lib » aws_s3 » StorageClass

Storage class to move an object to.

Example

const bucket = new s3.Bucket(this, 'MyBucket', {
  lifecycleRules: [
    {
      abortIncompleteMultipartUploadAfter: Duration.minutes(30),
      enabled: false,
      expiration: Duration.days(30),
      expirationDate: new Date(),
      expiredObjectDeleteMarker: false,
      id: 'id',
      noncurrentVersionExpiration: Duration.days(30),

      // the properties below are optional
      noncurrentVersionsToRetain: 123,
      noncurrentVersionTransitions: [
        {
          storageClass: s3.StorageClass.GLACIER,
          transitionAfter: Duration.days(30),

          // the properties below are optional
          noncurrentVersionsToRetain: 123,
        },
      ],
      objectSizeGreaterThan: 500,
      prefix: 'prefix',
      objectSizeLessThan: 10000,
      transitions: [
        {
          storageClass: s3.StorageClass.GLACIER,

          // the properties below are optional
          transitionAfter: Duration.days(30),
          transitionDate: new Date(),
        },
      ],
    },
  ],
});

Initializer

new StorageClass(value: string)

Parameters

  • value string

Properties

NameTypeDescription
valuestring
static DEEP_ARCHIVEStorageClassUse for archiving data that rarely needs to be accessed.
static GLACIERStorageClassStorage class for long-term archival that can take between minutes and hours to access.
static GLACIER_INSTANT_RETRIEVALStorageClassStorage class for long-term archival that can be accessed in a few milliseconds.
static INFREQUENT_ACCESSStorageClassStorage class for data that is accessed less frequently, but requires rapid access when needed.
static INTELLIGENT_TIERINGStorageClassThe INTELLIGENT_TIERING storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead.
static ONE_ZONE_INFREQUENT_ACCESSStorageClassInfrequent Access that's only stored in one availability zone.

value

Type: string


static DEEP_ARCHIVE

Type: StorageClass

Use for archiving data that rarely needs to be accessed.

Data stored in the DEEP_ARCHIVE storage class has a minimum storage duration period of 180 days and a default retrieval time of 12 hours. If you delete an object before the 180-day minimum, you are charged for 180 days. For pricing information, see Amazon S3 Pricing.


static GLACIER

Type: StorageClass

Storage class for long-term archival that can take between minutes and hours to access.

Use for archives where portions of the data might need to be retrieved in minutes. Data stored in the GLACIER storage class has a minimum storage duration period of 90 days and can be accessed in as little as 1-5 minutes using expedited retrieval. If you delete an object before the 90-day minimum, you are charged for 90 days.


static GLACIER_INSTANT_RETRIEVAL

Type: StorageClass

Storage class for long-term archival that can be accessed in a few milliseconds.

It is ideal for data that is accessed once or twice per quarter, and that requires immediate access. Data stored in the GLACIER_IR storage class has a minimum storage duration period of 90 days and can be accessed in as milliseconds. If you delete an object before the 90-day minimum, you are charged for 90 days.


static INFREQUENT_ACCESS

Type: StorageClass

Storage class for data that is accessed less frequently, but requires rapid access when needed.

Has lower availability than Standard storage.


static INTELLIGENT_TIERING

Type: StorageClass

The INTELLIGENT_TIERING storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead.

INTELLIGENT_TIERING delivers automatic cost savings by moving data on a granular object level between two access tiers, a frequent access tier and a lower-cost infrequent access tier, when access patterns change. The INTELLIGENT_TIERING storage class is ideal if you want to optimize storage costs automatically for long-lived data when access patterns are unknown or unpredictable.


static ONE_ZONE_INFREQUENT_ACCESS

Type: StorageClass

Infrequent Access that's only stored in one availability zone.

Has lower availability than standard InfrequentAccess.

Methods

NameDescription
toString()

toString()

public toString(): string

Returns

  • string