Skip to content

dy admin update table --mode provisioned fails if a table has an index #228

Open
@StoneDot

Description

@StoneDot

Currently, dy admin update table --mode provisioned fails if a table has an index. The request parameter of UpdateTable API does not seem to provide a provisioned capacity for indices.

❯ dy admin admin create table test --keys pk,S sk,S --region ap-northeast-1
name: test
region: ap-northeast-1
status: CREATING
schema:
  pk: pk (S)
  sk: sk (S)
mode: OnDemand
capacity: null
gsi: null
lsi: null
stream: null
count: 0
size_bytes: 0
created_at: 2024-05-14T13:29:11+00:00

❯ dy admin use test --region ap-northeast-1
Now you're using the table 'test' (ap-northeast-1).

❯ dy admin create index idx --keys gsipk,S gsisk,S
name: test
region: ap-northeast-1
status: UPDATING
schema:
  pk: pk (S)
  sk: sk (S)
mode: OnDemand
capacity: null
gsi:
- name: idx
  schema:
    pk: gsipk (S)
    sk: gsisk (S)
  capacity: null
lsi: null
stream: null
count: 0
size_bytes: 0
created_at: 2024-05-14T13:29:11+00:00

❯ dy admin update table test --mode provisioned --rcu 5 --wcu 10
**snip**
[2024-05-14T13:36:37Z DEBUG dy::control] UpdateTable API call got an error -- Validation(
        "One or more parameter values were invalid: ProvisionedThroughput must be specified for index: idx",
    )
[2024-05-14T13:36:37Z ERROR dy::control] One or more parameter values were invalid: ProvisionedThroughput must be specified for index: idx

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions