Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

Error: No provisioned throughput specified for the global secondary index #108

Closed
@okarmusk

Description

@okarmusk

Hello,
I'm trying to create table with global secondary index. I followed an example from: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GCICli.html#GCICli.CreateTableWithIndex

Based on documentation, I created script what should create table with global secondary index:

aws dynamodb create-table \
    --table-name ServiceConfiguration \
    --attribute-definitions \
        AttributeName=Version,AttributeType=S \
        AttributeName=ServiceName,AttributeType=S \
        AttributeName=LaunchDate,AttributeType=S \
        AttributeName=Tag,AttributeType=S \
        AttributeName=Checksum,AttributeType=S \
    --key-schema \
        AttributeName=Version,KeyType=HASH \
        AttributeName=ServiceName,KeyType=RANGE \
    --provisioned-throughput ReadCapacityUnits=10,WriteCapacityUnits=5 \
    --global-secondary-indexes \
        "[
            {
                \"IndexName\": \"LaunchDateIndex\",
                \"KeySchema\": [{\"AttributeName\":\"LaunchDate\",\"KeyType\":\"HASH\"},
                                {\"AttributeName\":\"Tag\",\"KeyType\":\"RANGE\"}],
                \"Projection\":{
                    \"ProjectionType\":\"INCLUDE\",
                    \"NonKeyAttributes\":[\"Version\", \"ServiceName\", \"Checksum\"]
                }
            }
        ]" \
    --endpoint-url http://localhost:8000

Example from dynamo-db developer guide doesn't work too, returns the same error.

The aws-cli return An error occurred (ValidationException) when calling the CreateTable operation: No provisioned throughput specified for the global secondary index.

I added line with --provisioned-throughput ReadCapacityUnits=10,WriteCapacityUnits=5 \.

aws-cli version aws-cli/2.2.1 Python/3.8.8 Linux/5.4.0-72-generic exe/x86_64.ubuntu.20 prompt/off
Localhost dynamo-db docker image amazon/dynamodb-local:1.15.0

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingclosed-for-stalenessThis issue was closed because it didn't receive updatesdocumentationImprovements or additions to documentationdynamodb

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions