Skip to content

Unable to get by GSI with dynamodb-local #78

Open
@onema

Description

@onema

Expected Behavior

When using DynamoLocal for development a call to getByGsi GSI HashKey returns a List of Items

Actual Behavior

After I moved from derjust/spring-data-dymanodb to this one I get the following error:

com.amazonaws.services.dynamodbv2.model.ResourceNotFoundException: Cannot do operations on a non-existent table (Service: AmazonDynamoDBv2; Status Code: 400; Error Code: ResourceNotFoundException

Steps to Reproduce the Problem

  1. The model has a composite key and GSI (hash key only)
  2. Repository with two methods one to find by (PK and SK) the second one to getByGsi (global secondary index)
  3. Call using an instance of the repository using the getByGsi method

Specifications

  • Spring Data DynamoDB Version: 5.2.5
  • Spring Data Version: 2.3.2-RELEASE
  • AWS SDK Version: 1.11.839
  • Java Version: java 11.0.6 2020-01-14 LTS
  • Platform Details: Mac OSX 10.15.6

Starting dynamodb-local like this:

docker run -d -p 8000:8000 amazon/dynamodb-local -jar DynamoDBLocal.jar -inMemory -sharedDb                                       

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions