小编Z M*_*ars的帖子

AWS:无法在一次更新中执行多个 GSI 创建或删除

所以我在无服务器部署过程中遇到了这个问题:

\n
ServerlessError: An error occurred: MyDdbTable - Cannot perform more than one GSI creation or deletion in a single update.\n
Run Code Online (Sandbox Code Playgroud)\n

我的DDB表配置是这样的: \n serverless.yml中的配置

\n
      AttributeDefinitions:\n          - AttributeName: externalId\n            AttributeType: S\n          - AttributeName: code\n            AttributeType: S\n          - AttributeName: accountId\n            AttributeType: S\n        KeySchema:\n          - AttributeName: externalId\n            KeyType: HASH\n          - AttributeName: code\n            KeyType: RANGE\n        GlobalSecondaryIndexes:\n          - IndexName: gsi-account-id\n            KeySchema:\n              - AttributeName: accountId\n                KeyType: HASH\n              - AttributeName: code\n                KeyType: RANGE\n            Projection:\n              ProjectionType: ALL\n          - IndexName: externalId\n            KeySchema:\n              - AttributeName: externalId\n                KeyType: HASH\n …
Run Code Online (Sandbox Code Playgroud)

amazon-web-services amazon-dynamodb serverless aws-serverless

8
推荐指数
1
解决办法
1万
查看次数