dynamodb import from s3 does not support LocalSecondaryIndexes, bug or intended behaviour?

0

AWS dynamodb released a "new" feature named import from s3 available in the console or using aws client sdk aws dynamodb --import-table. This operation also creates the dynamodb table before importing the data, thus it requires the specification of typical attributes to create a dynamodb table: table name, key schema (hash, range), billing mode, and a couple more. Although, it does not allow the specification of LocalSecondaryIndexes (LSI). Enter image description here Why not? It's a known fact that these cannot be added after the table has been created. So if i want to import a table with LSI i cannot use this feature. Is there is a reason behind this decision? Is it a bug? Are there plans for this to be allowed in a very short-term future? Thanks!

Pedro
已提問 1 年前檢視次數 1208 次
1 個回答
-1

According to AWS Document, Your data will be imported into a new DynamoDB table, which will be created when you initiate the import request. You can create this table with secondary indexes, then query and update your data across all primary and secondary indexes as soon as the import is complete. You can also add a global table replica after the import is complete.

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/S3DataImport.HowItWorks.html

profile pictureAWS
已回答 1 年前
  • Thank you very much for your quick reply! Both the documentation link and the video in it mention "secondary indexes" and do not distinguish between Global Secondary Indexes (GSIs) and Local Secondary Indexes (LSIs). I know for a fact that the import operation allows the specification of GSIs. Although, it does not seem to allow LSIs. Does this means that i should not be using LSIs at all and should be using GSIs instead? Thanks

  • I think this needs to be properly answered. I'm also trying to restore table with LSI from S3 backup. I'm using AWS SDK for JavaScript v3 and ImportTableCommand doesn't support LocalSecondaryIndexes in input, only GlobalSecondaryIndexes. And like said before after table has been created it's not possible to add LSI either.

    I don't know if only option to also restore LSIs is to first create the table manually and then import data separately making the whole ImportTableCommand useless as it requires that the table does not exist!

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南