I've been trying to deploy a Dynamo db using a cloud formation template and I keep getting the following error that the property AttributeType does not exist.
the yaml definition looks like:
MyDynoDB:
Type: AWS::DynamoDB::Table
Properties:
TableName: 'MyDynamoDb'
AttributeDefinitions:
- AttributeName: 'Id'
AttributeType: 'S'
- AttributeName: 'Name'
AttributeType: 'S'
KeySchema:
- AttributeName: 'Id'
KeyType: HASH
- AttributeName: 'Name'
KeyType: 'S'
ProvisionedThroughput:
ReadCapacityUnits: 5
WriteCapacityUnits: 5
StreamSpecification:
StreamViewType: NEW_AND_OLD_IMAGES
The stack will deploy but goes into rollback mode withe the following error.
CREATE_FAILED AWS::DynamoDB::Table MyDynoDB Encountered unsupported property AttributeType
Why am I seeing this error being generated?
UPDATE
based on the comments I've updated the Attribute and Key Schema definitions to now show:
AttributeDefinitions:
-
AttributeName: Id
AttributeType: S
-
AttributeName: Name
AttributeType: S
KeySchema:
-
AttributeName: Id
KeyType: HASH
-
AttributeName: Name
KeyType: RANGE
Unfortunately still seeing the same error
KeyType: 'S'
to some valid value. KeyType is only either HASH or RANGE. – sayboras