I am getting the error String is longer than the maximum length of 1.yaml-schema: AWSDynamoDBTableAttributeDefinition
for the block of code below
TodosTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: Todos-${self:provider.stage}
AttributeDefinitions:
- AttributeName: todoId
AttributeType: S
- AttributeName: createdAt
AttributeType: S
- AttributeName: name
AttributeType: S
- AttributeName: dueDate
AttributeType: S
KeySchema:
- AttributeName: todoId
KeyType: HASH
- AttributeName: createdAt
KeyType: RANGE
BillingMode: PAY_PER_REQUEST
StreamSpecification:
StreamViewType: NEW_IMAGE
LocalSecondaryIndexes:
- IndexName: todoNameIndex
KeySchema:
- AttributeName: todoId
KeyType: HASH
- AttributeName: name
KeyType: RANGE
Projection:
ProjectionType: ALL
Interpretation: the yaml schema seems to be confusing the AttributeName
with AttributeType
. As it expects the string to be only one character.
How is this fixed?