If I run storage init for a DDB table:
[rear-window-fe] copilot storage init master ✗ ✠✱
Only found one service in workspace, defaulting to: fe
Storage type: DynamoDB
Storage resource name: game
Partition key: game_id
Partition key datatype: String
Sort key? No
✔ Wrote CloudFormation template for DynamoDB Table game at copilot/fe/addons/game.yml
The generated CF looks like this:
game:
Type: AWS::DynamoDB::Table
DeletionPolicy: Retain
Properties:
TableName: !Sub ${App}-${Env}-${Name}-game
AttributeDefinitions:
- AttributeName: game_id
AttributeType: "S"
BillingMode: PAY_PER_REQUEST
KeySchema:
- AttributeName: game_id
KeyType: HASH
LocalSecondaryIndexes:
The empty LocalSecondaryIndexes isn't valid and causes the deployment to fail.
I thought this was fixed with: https://github.com/aws/copilot-cli/pull/1057, did you pull the latest changes?
Yea - my latest commit is a0af829de916b7b85596cd34126c38ac751761ca - I'm wondering if this is because in this table, there's no range key at all?