Let's say I have a case when I need to use different DynamoDb tables with different environments. For example, I want to have DevTable on dev and ProdTable on prod.
So, is there any way to use custom DynamoDBMapper with spring-data repositories?
DynamoDBMapperConfig provides a way to override the TableName specified on the Entity object using @DynamoDBTable annotation, through TableNameOverride class.
You can define a TableNameOverride bean that modifies the table name at runtime, in your spring-data based application. See https://github.com/derjust/spring-data-dynamodb/wiki/Alter-table-name-during-runtime.