aws-cdk-lib.aws_s3.InventoryDestination

interface InventoryDestination

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

The destination of the inventory.

Example

const inventoryBucket = new s3.Bucket(this, 'InventoryBucket');

const dataBucket = new s3.Bucket(this, 'DataBucket', {
  inventories: [
    {
      frequency: s3.InventoryFrequency.DAILY,
      includeObjectVersions: s3.InventoryObjectVersion.CURRENT,
      destination: {
        bucket: inventoryBucket,
      },
    },
    {
      frequency: s3.InventoryFrequency.WEEKLY,
      includeObjectVersions: s3.InventoryObjectVersion.ALL,
      destination: {
        bucket: inventoryBucket,
        prefix: 'with-all-versions',
      },
    },
  ],
});

Properties

NameTypeDescription
bucketIBucketBucket where all inventories will be saved in.
bucketOwner?stringThe account ID that owns the destination S3 bucket.
prefix?stringThe prefix to be used when saving the inventory.

bucket

Type: IBucket

Bucket where all inventories will be saved in.


bucketOwner?

Type: string (optional, default: No account ID.)

The account ID that owns the destination S3 bucket.

If no account ID is provided, the owner is not validated before exporting data. It's recommended to set an account ID to prevent problems if the destination bucket ownership changes.


prefix?

Type: string (optional, default: No prefix.)

The prefix to be used when saving the inventory.