You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The model has a composite key and GSI (hash key only)
Repository with two methods one to find by (PK and SK) the second one to getByGsi (global secondary index)
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
The text was updated successfully, but these errors were encountered:
@Configuration
@EnableDynamoDBRepositories(basePackageClasses = UserRepository.class)
public class DynamoDBConfig {
private final String env = System.getenv(GenericConstants.ENV_KEY);
@Bean
public AmazonDynamoDB amazonDynamoDB() {
return AmazonDynamoDBClientBuilder.standard().build();
}
@Bean
public DynamoDBMapperConfig.TableNameOverride tableNameOverride() {
return DynamoDBMapperConfig.TableNameOverride.withTableNamePrefix(
GenericConstants.DYNAMODB_TABLENAME_PREFIX + env + "-");
}
@Bean
@Primary
public DynamoDBMapperConfig dynamoDBMapperConfig() {
return DynamoDBMapperConfig.builder().withTableNameOverride(tableNameOverride()).build();
}
@Bean
@Primary
public DynamoDBMapper dynamoDBMapper() {
return new DynamoDBMapper(amazonDynamoDB(), dynamoDBMapperConfig());
}
}
The error is: com.amazonaws.services.dynamodbv2.model.ResourceNotFoundException: Requested resource not found (Service: AmazonDynamoDBv2; Status Code: 400; Error Code: ResourceNotFoundException; Request ID: 6OF2GOG6ADVLP8JA2D3A8H0B8VVV4KQNSO5AEMVJF66Q9ASUAAJG; Proxy: null)
Expected Behavior
When using DynamoLocal for development a call to
getByGsi
GSI HashKey returns a List of ItemsActual Behavior
After I moved from
derjust/spring-data-dymanodb
to this one I get the following error:Steps to Reproduce the Problem
getByGsi
(global secondary index)getByGsi
methodSpecifications
5.2.5
2.3.2-RELEASE
1.11.839
java 11.0.6 2020-01-14 LTS
Starting dynamodb-local like this:
The text was updated successfully, but these errors were encountered: