I want to set some Attributes for my DynamoDB table in Cloudformation, but I get this error:
Code:
DynamoDB:
Type: AWS::DynamoDB::Table
Properties:
AttributeDefinitions:
- AttributeName: UserId
AttributeType: S
- AttributeName: Username
AttributeType: S
- AttributeName: Surname
AttributeType: S
- AttributeName: Email
AttributeType: S
BillingMode: PAY_PER_REQUEST
KeySchema:
- AttributeName: UserId
KeyType: HASH
Error:
E3039 The set of Attributes in AttributeDefinitions: ['Email', 'Surname', 'UserId', 'Username'] and KeySchemas: ['UserId'] must match at Resources/User/Properties