I am using ful-stack boilerplate to start coding and one thing I noticed that serverless.yml doesn’t support string set for dynamodb.
Error that I am getting is following:
ValidationException: 1 validation error detected: Value ‘SS’ at ‘attributeDefinitions.6.member.attributeType’ failed to satisfy constraint: Member must satisfy enum value set: [B, N, S]
here is my yaml file
component: aws-dynamodb
name: project
inputs:
name: project-${stage}
region: ca-central-1
deletionPolicy: delete
attributeDefinitions:
- AttributeName: ProjectId
AttributeType: S
- AttributeName: CustomerId
AttributeType: S
- AttributeName: Name
AttributeType: S
- AttributeName: CreatedOn
AttributeType: S
- AttributeName: CreatedBy
AttributeType: S
- AttributeName: Files
AttributeType: SS
keySchema:
- AttributeName: CustomerId
KeyType: HASH
- AttributeName: ProjectId
KeyType: RANGE
globalSecondaryIndexes:
- IndexName: gsi1
KeySchema:
- AttributeName: Name
KeyType: HASH
Projection:
ProjectionType: ALL