ImportSourceSpecification

class aws_cdk.aws_dynamodb.ImportSourceSpecification(*, bucket, input_format, bucket_owner=None, compression_type=None, key_prefix=None)

Bases: object

Properties for importing data from the S3.

Parameters:
  • bucket (IBucket) – The S3 bucket that is being imported from.

  • input_format (InputFormat) – The format of the imported data.

  • bucket_owner (Optional[str]) – The account number of the S3 bucket that is being imported from. Default: - no value

  • compression_type (Optional[InputCompressionType]) – The compression type of the imported data. Default: InputCompressionType.NONE

  • key_prefix (Optional[str]) – The key prefix shared by all S3 Objects that are being imported. Default: - no value

ExampleMetadata:

infused

Example:

import aws_cdk as cdk
import aws_cdk.aws_s3 as s3

# bucket: s3.IBucket


app = cdk.App()
stack = cdk.Stack(app, "Stack")

dynamodb.Table(stack, "Table",
    partition_key=dynamodb.Attribute(
        name="id",
        type=dynamodb.AttributeType.STRING
    ),
    import_source=dynamodb.ImportSourceSpecification(
        compression_type=dynamodb.InputCompressionType.GZIP,
        input_format=dynamodb.InputFormat.dynamo_dBJson(),
        bucket=bucket,
        key_prefix="prefix"
    )
)

Attributes

bucket

The S3 bucket that is being imported from.

bucket_owner

The account number of the S3 bucket that is being imported from.

Default:
  • no value

compression_type

The compression type of the imported data.

Default:

InputCompressionType.NONE

input_format

The format of the imported data.

key_prefix

The key prefix shared by all S3 Objects that are being imported.

Default:
  • no value