Aws-cli: ¿Alguien puede ayudarme a crear una tabla de DynamoDB con índice secundario local usando AWS cli?

Creado en 16 jun. 2016  ·  3Comentarios  ·  Fuente: aws/aws-cli

guidance service-api

Comentario más útil

aws dynamodb create-table --nombre-tabla XYZ --attribute-definition AttributeName = Id, AttributeType = N AttributeName = Name, AttributeType = S --key-schema AttributeName = Id, KeyType = HASH AttributeName = Nombre, KeyType = RANGE - -provisioned-throughput ReadCapacityUnits = 5, WriteCapacityUnits = 5 --local-secundaria-indexes 'IndexName = idx1, KeySchema = [{AttributeName = Id, KeyType = HASH}, {AttributeName = Name, KeyType = RANGE}], Proyección = { ProjectionType = ALL} '

Todos 3 comentarios

Para un LSI, usaría --local-secondary-indexes 'IndexName=string,KeySchema=[{AttributeName=string,KeyType=string},{AttributeName=string,KeyType=string}],Projection={ProjectionType=string,NonKeyAttributes=[string,string]}' en su llamada create-table .

Si sigues teniendo problemas, ven a charlar con nosotros en nuestra sala de gitter. Cierre a favor de gitter.

Hola Jamesls,

aws dynamodb create-table --nombre de tabla XYZ --attribute-definition AttributeName = Id, AttributeType = N AttributeName = Name, AttributeType = S AttributeName = Sexo, AttributeType = S --key-schema AttributeName = Id, KeyType = HASH AttributeName = Nombre, KeyType = RANGE --provisioned-throughput ReadCapacityUnits = 5, WriteCapacityUnits = 5 --local-secondary-indexes 'IndexName = string, KeySchema = [{AttributeName = Gender, KeyType = RANGE}, {AttributName = Id, KeyType = HASH}], Proyección = {Tipo de proyección = TODOS} '

He usado el código anterior para crear una tabla. Pero recibo el error:

_Parámetro de análisis de errores '--local-secondary-indexes': esperado: '=', recibido: ''
'para entrada:
'IndexName = string, KeySchema = [{AttributeName = Gender, KeyType = RANGE}, {AttributName =
Id, KeyType = HASH}], Proyección = {ProjectionType = ALL} '_

Gracias por su apoyo

aws dynamodb create-table --nombre-tabla XYZ --attribute-definition AttributeName = Id, AttributeType = N AttributeName = Name, AttributeType = S --key-schema AttributeName = Id, KeyType = HASH AttributeName = Nombre, KeyType = RANGE - -provisioned-throughput ReadCapacityUnits = 5, WriteCapacityUnits = 5 --local-secundaria-indexes 'IndexName = idx1, KeySchema = [{AttributeName = Id, KeyType = HASH}, {AttributeName = Name, KeyType = RANGE}], Proyección = { ProjectionType = ALL} '

¿Fue útil esta página
0 / 5 - 0 calificaciones