Skip to content
v2.274.0

ImportSourceSpecification Struct ​

Properties for importing data from the S3.

Example ​

ts
import * as cdk from 'aws-cdk-lib';
import * as s3 from 'aws-cdk-lib/aws-s3';

const app = new cdk.App();
const stack = new cdk.Stack(app, 'Stack');

declare const bucket: s3.IBucket;

new dynamodb.Table(stack, 'Table', {
  partitionKey: {
    name: 'id',
    type: dynamodb.AttributeType.STRING,
  },
  importSource: {
    compressionType: dynamodb.InputCompressionType.GZIP,
    inputFormat: dynamodb.InputFormat.dynamoDBJson(),
    bucket,
    keyPrefix: 'prefix',
  },
});

Properties ​

bucketIBucketbucketIBucketbucketIBucketBucketIBucketBucketIBucketrequired#
The S3 bucket that is being imported from.
bucketOwneroptionalstringbucket_owneroptionalstrbucketOwneroptionalStringBucketOwneroptionalstringBucketOwneroptional*string#
The account number of the S3 bucket that is being imported from.

Default: no value

compressionTypeoptionalInputCompressionTypecompression_typeoptionalInputCompressionTypecompressionTypeoptionalInputCompressionTypeCompressionTypeoptionalInputCompressionTypeCompressionTypeoptionalInputCompressionType= InputCompressionType.NONE#
The compression type of the imported data.
inputFormatInputFormatinput_formatInputFormatinputFormatInputFormatInputFormatInputFormatInputFormatInputFormatrequired#
The format of the imported data.
keyPrefixoptionalstringkey_prefixoptionalstrkeyPrefixoptionalStringKeyPrefixoptionalstringKeyPrefixoptional*string#
The key prefix shared by all S3 Objects that are being imported.

Default: no value