dynamodb create cloudformation aws amazon-dynamodb amazon-cloudformation

amazon-dynamodb - create - aws dynamodb cloudformation



CloudFormation insiste en que mi creación de DynamoDB JSON no es válida... pero no puedo ver cómo (1)

Esto se debió a un malentendido de mi parte con respecto a DynamoDB. Los únicos atributos que deben definirse aquí son aquellos que se utilizarán como claves. Por lo tanto, cambiar la matriz AttributeDefinitions a la siguiente resolvió el problema:

"AttributeDefinitions": [ { "AttributeName": "audit_id", "AttributeType": "S" } ]

Aquí está (la parte de DynamoDB de) mi JSON generado por la Troposfera:

"sandbox": { "Properties": { "AttributeDefinitions": [ { "AttributeName": "audit_id", "AttributeType": "S" }, { "AttributeName": "status", "AttributeType": "S" }, { "AttributeName": "filename", "AttributeType": "S" }, { "AttributeName": "file_detected_dt", "AttributeType": "S" }, { "AttributeName": "time_taken", "AttributeType": "N" }, { "AttributeName": "number_rows_processed_file", "AttributeType": "N" }, { "AttributeName": "number_rows_created_db", "AttributeType": "N" }, { "AttributeName": "info_messages", "AttributeType": "S" } ], "KeySchema": [ { "AttributeName": "audit_id", "KeyType": "HASH" } ], "ProvisionedThroughput": { "ReadCapacityUnits": { "Ref": "ReadCapacityUnits" }, "WriteCapacityUnits": { "Ref": "WriteCapacityUnits" } } }, "Type": "AWS::DynamoDB::Table" }

CloudFormation me da este error al intentar girar la VPC: Property AttributeDefinitions is inconsistent with the KeySchema of the table and the secondary indexes .

¿Pero es? Estoy especificando audit_id como una clave solitaria, y definitivamente existe dentro de la lista AttributeDefinitions. Soy muy nuevo en la FQ (y Dynamo, por lo demás), así que es posible que me esté perdiendo algo extremadamente obvio, pero en este momento no es evidente para mí.

Busqué en Google y realmente solo encontré una mención de este error, y tenía más que ver con una capa entre el desarrollador y CF, en lugar de CF en sí.

¿Alguien puede señalar lo que está mal con mi plantilla?