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
asked a year ago1176 views
1 Answer
-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
answered a year ago
  • 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!

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions