2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AWS CDKのDynamoデプロイ時に、Cannot update GSI's properties other than Provisioned Throughput. You can create a new GSI with a different name のエラーが出たときのメモ

Posted at

事象

DynamoDBをCloudFormationでデプロイしているが、GSIの設定をアップデートするときに、以下のエラーが発生した。

Cannot update GSI's properties other than Provisioned Throughput. You can create a new GSI with a different name

解決策

「更新」はできないので、「削除」してから「作成」する。

    new dynamoDb.CfnTable(scope, '[tableName]', {
        tableName: tableName,
        attributeDefinitions: [...],
        keySchema: [],
        billingMode: ...,
        tags: ...,
    });

GSI設定を除いたものをデプロイする。

    new dynamoDb.CfnTable(scope, '[tableName]', {
        tableName: tableName,
        attributeDefinitions: [...],
        keySchema: [],
        globalSecondaryIndexes: [],
        billingMode: ...,
        tags: ...,
    });

GSI設定を含めたものをデプロイする。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?