Skip to content

Commit 45b8398

Browse files
authored
feat(dynamodb): import data from the bucket (#28610)
This PR adds support for importing data from a bucket. This feature is not supported by `AWS::DynamoDB::GlobalTable`, so it is implemented only in the `Table` construct. ### Details of this feature Users can create DynamoDB table using data from the bucket. The data to be imported can be a single object or multiple objects. This can be selected by specifying the prefix of the key. Data format must be CSV, DynamoDB JSON, or Amazon Ion. ZSTD or GZIP compressed data can also be imported. For CSV files, delimiter and header can be specified as options. https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/S3forDynamoDB.html In CloudFormation, use this feat as follows. ```yaml AWSTemplateFormatVersion: "2010-09-09" Resources: MyTable: Type: AWS::DynamoDB::Table Properties: AttributeDefinitions: - AttributeName: "id" AttributeType: "S" KeySchema: - AttributeName: "id" KeyType: "HASH" TableName: "myTableName" ImportSourceSpecification: InputCompressionType: NONE # GZIP | ZSTD InputFormat: DYNAMODB_JSON # ION | CSV S3BucketSource: S3Bucket: cloudfs-s3 S3KeyPrefix: db ``` https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-importsourcespecification.html Closes #21825 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 1222aaa commit 45b8398

File tree

21 files changed

+37135
-0
lines changed

21 files changed

+37135
-0
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.import-source.js.snapshot/DynamoImportSourceIntegTestDefaultTestDeployAssert540810E4.assets.json

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.import-source.js.snapshot/DynamoImportSourceIntegTestDefaultTestDeployAssert540810E4.template.json

Lines changed: 248 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.import-source.js.snapshot/DynamoStack.assets.json

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)